mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 13:47:58 +03:00
Implement Stop()
This commit is contained in:
parent
3af35fa610
commit
68181acec7
2 changed files with 24 additions and 2 deletions
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2024 the OpenMoHAA team
|
||||
Copyright (C) 2025 the OpenMoHAA team
|
||||
|
||||
This file is part of OpenMoHAA source code.
|
||||
|
||||
|
@ -250,3 +250,24 @@ void Mover::LinearInterpolate(Vector tdest, Vector angdest, float time, Event& e
|
|||
|
||||
PostEvent(EV_MoveDone, time);
|
||||
}
|
||||
|
||||
/*
|
||||
=============
|
||||
Stop
|
||||
===============
|
||||
*/
|
||||
void Mover::Stop()
|
||||
{
|
||||
if (endevent) {
|
||||
delete endevent;
|
||||
endevent = NULL;
|
||||
}
|
||||
|
||||
CancelEventsOfType(EV_MoveDone);
|
||||
|
||||
moveflags = 0;
|
||||
avelocity = vec_zero;
|
||||
velocity = vec_zero;
|
||||
accel = vec_zero;
|
||||
aaccel = vec_zero;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/*
|
||||
===========================================================================
|
||||
Copyright (C) 2024 the OpenMoHAA team
|
||||
Copyright (C) 2025 the OpenMoHAA team
|
||||
|
||||
This file is part of OpenMoHAA source code.
|
||||
|
||||
|
@ -48,6 +48,7 @@ public:
|
|||
void MoveDone(Event *ev);
|
||||
void MoveTo(Vector tdest, Vector angdest, float tspeed, Event& event);
|
||||
void LinearInterpolate(Vector tdest, Vector angdest, float time, Event& event);
|
||||
void Stop();
|
||||
void Archive(Archiver& arc) override;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue