mirror of
https://github.com/ZDoom/Raze.git
synced 2025-03-22 17:01:08 +00:00
- fixed invocation of RunState.
This commit is contained in:
parent
83c401574c
commit
b55d39e58d
2 changed files with 2 additions and 10 deletions
|
@ -135,15 +135,13 @@ void TickActor(DDukeActor* self)
|
|||
bool conres = execute(self, p, pdist);
|
||||
if (!conres && (self->flags4 & SFLAG4_CONOVERRIDE))
|
||||
{
|
||||
self->state_player = &ps[p];
|
||||
self->state_dist = pdist;
|
||||
self->flags4 |= SFLAG4_INRUNSTATE;
|
||||
IFVIRTUALPTR(self, DDukeActor, RunState)
|
||||
{
|
||||
VMValue val[] = { self };
|
||||
VMValue val[] = { self, &ps[p], pdist};
|
||||
try
|
||||
{
|
||||
VMCall(func, val, 1, nullptr, 0);
|
||||
VMCall(func, val, 3, nullptr, 0);
|
||||
}
|
||||
catch(const CDukeKillEvent& ev)
|
||||
{
|
||||
|
@ -155,8 +153,6 @@ void TickActor(DDukeActor* self)
|
|||
}
|
||||
}
|
||||
self->flags4 &= ~SFLAG4_INRUNSTATE;
|
||||
self->state_player = nullptr;
|
||||
self->state_dist = -1;
|
||||
conres = true;
|
||||
}
|
||||
// moveactor gets only called for actors with a scripted runner.
|
||||
|
|
|
@ -110,10 +110,6 @@ public:
|
|||
TObjPtr<DDukeActor*> temp_actor, seek_actor;
|
||||
TArray<GameVarValue> uservars;
|
||||
|
||||
// these two variables are only valid while RunState is executed. They are explicitly nulled right afterward and only accessible throgh the CON emulation interface.
|
||||
struct player_struct* state_player;
|
||||
double state_dist;
|
||||
|
||||
DDukeActor() = default;
|
||||
size_t PropagateMark() override;
|
||||
const ActorInfo* conInfo() const;
|
||||
|
|
Loading…
Reference in a new issue