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 8d205bc896
commit 3a37bda806
2 changed files with 4 additions and 9 deletions

View file

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

View file

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