|
From: Rob <geo...@us...> - 2005-08-28 20:32:46
|
Update of /cvsroot/timewarp/source/sc1ships In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4837/source/sc1ships Modified Files: shpandgu.cpp shparisk.cpp shpearcr.cpp shpilwav.cpp shpkzedr.cpp shpmmrxf.cpp shpshosc.cpp shpsyrpe.cpp shpumgdr.cpp shpvuxin.cpp shpyehte.cpp Log Message: debugging Index: shpandgu.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc1ships/shpandgu.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** shpandgu.cpp 14 Aug 2005 16:14:50 -0000 1.15 --- shpandgu.cpp 28 Aug 2005 20:32:37 -0000 1.16 *************** *** 155,158 **** --- 155,160 ---- void AndrosynthBubble::calculate() { + AnimatedShot::calculate(); + if (!(ship && ship->exists())) { *************** *** 163,167 **** double newAngle; - AnimatedShot::calculate(); courseFrames += frame_time; if(courseFrames >= 150) { --- 165,168 ---- Index: shpearcr.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc1ships/shpearcr.cpp,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** shpearcr.cpp 11 Jul 2005 00:25:58 -0000 1.8 --- shpearcr.cpp 28 Aug 2005 20:32:37 -0000 1.9 *************** *** 47,51 **** Query a; for (a.begin(this, bit(LAYER_SHIPS) + bit(LAYER_SHOTS) + bit(LAYER_SPECIAL) + ! bit(LAYER_CBODIES), specialRange); a.current; a.next()) { o = a.currento; if( (!o->isInvisible()) && !o->sameTeam(this) && (o->collide_flag_anyone & bit(LAYER_LINES))) { --- 47,51 ---- Query a; for (a.begin(this, bit(LAYER_SHIPS) + bit(LAYER_SHOTS) + bit(LAYER_SPECIAL) + ! bit(LAYER_CBODIES), specialRange, QUERY_OBJECT); a.current; a.next()) { o = a.currento; if( (!o->isInvisible()) && !o->sameTeam(this) && (o->collide_flag_anyone & bit(LAYER_LINES))) { Index: shpmmrxf.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc1ships/shpmmrxf.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** shpmmrxf.cpp 24 Mar 2004 23:51:44 -0000 1.9 --- shpmmrxf.cpp 28 Aug 2005 20:32:37 -0000 1.10 *************** *** 65,68 **** --- 65,70 ---- void MmrnmhrmXForm::calculate() { + Ship::calculate(); + if(laserSpark > 0) { laserSpark-= frame_time; *************** *** 77,81 **** } - Ship::calculate(); } --- 79,82 ---- Index: shpumgdr.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc1ships/shpumgdr.cpp,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** shpumgdr.cpp 23 Aug 2005 22:18:11 -0000 1.20 --- shpumgdr.cpp 28 Aug 2005 20:32:37 -0000 1.21 *************** *** 64,67 **** --- 64,69 ---- void UmgahDrone::calculate() { + Ship::calculate(); + if (fire_weapon) recharge_step = recharge_rate; *************** *** 69,73 **** firing = false; - Ship::calculate(); } --- 71,74 ---- Index: shparisk.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc1ships/shparisk.cpp,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** shparisk.cpp 14 Aug 2005 16:14:50 -0000 1.9 --- shparisk.cpp 28 Aug 2005 20:32:37 -0000 1.10 *************** *** 36,40 **** Query a; ! for (a.begin(this, bit(LAYER_SHIPS), weaponRange + 200); a.current; a.next()) { if ((distance(a.current) < r) && !a.current->isInvisible()) { o = a.currento; --- 36,40 ---- Query a; ! for (a.begin(this, bit(LAYER_SHIPS), weaponRange + 200, QUERY_OBJECT); a.current; a.next()) { if ((distance(a.current) < r) && !a.current->isInvisible()) { o = a.currento; Index: shpyehte.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc1ships/shpyehte.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** shpyehte.cpp 24 Mar 2004 23:51:44 -0000 1.7 --- shpyehte.cpp 28 Aug 2005 20:32:37 -0000 1.8 *************** *** 41,47 **** void YehatTerminator::calculate() { if(shieldFrames > 0) shieldFrames-= frame_time; - Ship::calculate(); } --- 41,48 ---- void YehatTerminator::calculate() { + Ship::calculate(); + if(shieldFrames > 0) shieldFrames-= frame_time; } Index: shpshosc.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc1ships/shpshosc.cpp,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** shpshosc.cpp 24 Mar 2004 23:51:44 -0000 1.7 --- shpshosc.cpp 28 Aug 2005 20:32:37 -0000 1.8 *************** *** 40,44 **** if(glory == 3) { Query q; ! for (q.begin(this, OBJECT_LAYERS, specialRange); q.currento; q.next()) { if (q.currento->canCollide(this)) { gloryDamage = (int)ceil((specialRange - distance(q.currento)) / specialRange * specialDamage); --- 40,44 ---- if(glory == 3) { Query q; ! for (q.begin(this, OBJECT_LAYERS, specialRange, QUERY_OBJECT); q.currento; q.next()) { if (q.currento->canCollide(this)) { gloryDamage = (int)ceil((specialRange - distance(q.currento)) / specialRange * specialDamage); Index: shpsyrpe.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc1ships/shpsyrpe.cpp,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** shpsyrpe.cpp 14 Aug 2005 16:14:50 -0000 1.15 --- shpsyrpe.cpp 28 Aug 2005 20:32:37 -0000 1.16 *************** *** 115,119 **** } ! void CrewPod::calculate() { frame_step += frame_time; while (frame_step >= frame_size) { --- 115,122 ---- } ! void CrewPod::calculate() ! { ! SpaceObject::calculate(); ! frame_step += frame_time; while (frame_step >= frame_size) { *************** *** 134,138 **** else ship = NULL; - SpaceObject::calculate(); } --- 137,140 ---- Index: shpilwav.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc1ships/shpilwav.cpp,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** shpilwav.cpp 1 Aug 2005 10:46:34 -0000 1.10 --- shpilwav.cpp 28 Aug 2005 20:32:37 -0000 1.11 *************** *** 81,84 **** --- 81,86 ---- void IlwrathAvenger::calculate() { + Ship::calculate(); + if((cloak) && (cloak_frame < 300)) cloak_frame += frame_time; *************** *** 86,90 **** cloak_frame -= frame_time; - Ship::calculate(); } --- 88,91 ---- Index: shpvuxin.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc1ships/shpvuxin.cpp,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** shpvuxin.cpp 11 Jul 2005 00:25:58 -0000 1.12 --- shpvuxin.cpp 28 Aug 2005 20:32:37 -0000 1.13 *************** *** 75,78 **** --- 75,80 ---- void VuxLimpet::calculate() { + AnimatedShot::calculate(); + if(!(ship && ship->exists())) { state = 0; *************** *** 80,88 **** } ! if((ship->target) && (!ship->target->isInvisible())) { angle = trajectory_angle(ship->target); vel = v * unit_vector(angle); } - AnimatedShot::calculate(); } --- 82,89 ---- } ! if((ship && ship->target) && (!ship->target->isInvisible())) { angle = trajectory_angle(ship->target); vel = v * unit_vector(angle); } } Index: shpkzedr.cpp =================================================================== RCS file: /cvsroot/timewarp/source/sc1ships/shpkzedr.cpp,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** shpkzedr.cpp 23 Aug 2005 22:18:11 -0000 1.14 --- shpkzedr.cpp 28 Aug 2005 20:32:37 -0000 1.15 *************** *** 141,152 **** target = ship->target; if((target == NULL) || (air_frames < (max_air_frames / 2)) || target->isInvisible()) { ! collide_flag_sameship |= bit(LAYER_SHIPS); changeDirection(trajectory_angle(ship)); return; } ! collide_flag_sameship &= ~bit(LAYER_SHIPS); if ((distance(target) < laser_range) && (batt <= 0)) { ! collide_flag_sameship = 0; vel = 0; play_sound2(data->sampleExtra[0]); --- 141,152 ---- target = ship->target; if((target == NULL) || (air_frames < (max_air_frames / 2)) || target->isInvisible()) { ! collide_flag_sameship = ~bit(LAYER_SPECIAL); changeDirection(trajectory_angle(ship)); return; } ! collide_flag_sameship = 0; if ((distance(target) < laser_range) && (batt <= 0)) { ! //collide_flag_sameship = 0; vel = 0; play_sound2(data->sampleExtra[0]); *************** *** 198,202 **** damage(ship, 0, -1); } ! if (!other->isPlanet()) { state = 0; --- 198,203 ---- damage(ship, 0, -1); } ! ! if (!other->isPlanet() && !(other->parent == parent)) // don't collide with a planet or other fighters. { state = 0; |