0
0
Fork 0
mirror of https://github.com/ZDoom/Raze.git synced 2025-03-02 06:52:58 +00:00

do not copy players, it is not allowed for polymorphic classes.

This commit is contained in:
Christoph Oelckers 2023-10-03 08:30:00 +02:00
parent ec69e644f7
commit 7d26d3b87c
2 changed files with 4 additions and 9 deletions
source/games/duke/src

View file

@ -524,14 +524,8 @@ void resetpspritevars(int g, const DVector3& startpos, const DAngle startang)
} }
} }
resetplayerstats(0);
for (i = 1; i < MAXPLAYERS; i++) for (i = 1; i < MAXPLAYERS; i++)
{ resetplayerstats(i);
const auto thisp = getPlayer(i);
*thisp = *firstp;
thisp->pnum = i;
}
if (ud.recstat != 2) for (i = 0; i < MAXPLAYERS; i++) if (ud.recstat != 2) for (i = 0; i < MAXPLAYERS; i++)
{ {

View file

@ -232,7 +232,10 @@ class DDukePlayer final : public DCorePlayer
DDukePlayer() = default; DDukePlayer() = default;
public: public:
DDukePlayer(uint8_t p) : DCorePlayer(p) {} DDukePlayer(uint8_t p) : DCorePlayer(p) {}
DDukePlayer& operator=(DDukePlayer&) = delete;
DDukePlayer(DDukePlayer&) = delete;
void Serialize(FSerializer& arc) override; void Serialize(FSerializer& arc) override;
TArray<GameVarValue> uservars;
DVector3 vel; DVector3 vel;
DVector2 bobpos; DVector2 bobpos;
DVector2 fric; DVector2 fric;
@ -350,8 +353,6 @@ public:
uint8_t moto_do_bump, moto_bump_fast, moto_on_oil, moto_on_mud; uint8_t moto_do_bump, moto_bump_fast, moto_on_oil, moto_on_mud;
double MotoSpeed; double MotoSpeed;
TArray<GameVarValue> uservars;
int GetPlayerNum(); int GetPlayerNum();
void apply_seasick(); void apply_seasick();