diff --git a/game/reconstructed/btplayer.cpp b/game/reconstructed/btplayer.cpp index 64206fa..42ac51a 100644 --- a/game/reconstructed/btplayer.cpp +++ b/game/reconstructed/btplayer.cpp @@ -237,6 +237,28 @@ void Check(this); Check(message); + // + // scoring wave (DEATHS fix): @004c012c is the drop-zone RESPAWN-RETRY helper -- + // the engine's RequestDropZone (PLAYER.cpp:400) posts a 2s-delayed VehicleDead + // (deathCount=-2) as a "did the drop zone reply?" timer. If the player already + // has a vehicle, the drop zone WAS acquired (the DropZoneReply created it) -> the + // retry is moot: don't count a death and don't re-post. The prior unconditional + // ++deathCount + re-post was an INFINITE loop in solo (the drop-zone handshake + // never "completes" in the bring-up), climbing deathCount ~1/s. (A real MP death + // -- vehicle destroyed -> playerVehicle cleared/the @004c05c4 path -- is deferred.) + // + if (playerVehicle != 0) + { + deathPending = 0; // this+0x290 + suppressConsole = 0; // this+0x258 + Check_Fpu(); + return; + } + + if (getenv("BT_SCORE_LOG")) + DEBUG_STREAM << "[score] VehicleDeadMessageHandler: deathCount " << deathCount + << " -> " << (deathCount + 1) << "\n" << std::flush; + // // One more death; tell the message (so replicants stay in sync) and // debit a life against the scoring role. @@ -823,6 +845,11 @@ void Check(this); Check(message); + if (getenv("BT_SCORE_LOG")) + DEBUG_STREAM << "[score] DropZoneReply: hasVehicle=" << (playerVehicle != 0) + << " deathCount=" << deathCount << " msgDeath=" << message->deathCount + << " state=" << (int)GetSimulationState() << "\n" << std::flush; + if (!playerVehicle) // param_1[0x7f] == 0 { CreatePlayerVehicle(message->dropZoneLocation); // (**vtable+0x40)(origin) @@ -836,6 +863,11 @@ void if (playerVehicle->GetClassID() == Mech::MechClassID) // 0xbb9 { SetPerformance(&BTPlayer::PlayerSimulation); // perf @00513058 + // scoring wave (RANK fix): an active mech combatant is a SCORING player. + // Player::DefaultFlags creates every player NonScoring (rank -1 until + // activated); CalcRanking only ranks IsScoringPlayer()==true. The camera + // ship (below) stays non-scoring; a piloted mech becomes scoring here. + SetScoringPlayerFlag(); // clear NonScoringPlayerFlag } else // camera ship (0x45) {