func_door: Fix `targetClose` not getting triggered right when START_OPEN spawnflag is set
This commit is contained in:
parent
c0b031ed9f
commit
9c66c2c5f9
|
@ -416,16 +416,23 @@ func_door::MoverFinishesMoving(void)
|
||||||
MoveToPosition(GetMoverPosition1(), m_flSpeed);
|
MoveToPosition(GetMoverPosition1(), m_flSpeed);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we arrived at our starting position within the map */
|
|
||||||
if (GetMoverState() == MOVER_POS1) {
|
if (targetClose && targetClose != "") {
|
||||||
if (targetClose)
|
/* when it starts open the positions are reversed... */
|
||||||
for (entity f = world; (f = find(f, ::targetname, targetClose));) {
|
if (GetMoverState() == MOVER_POS1 ||
|
||||||
NSEntity trigger = (NSEntity)f;
|
(HasSpawnFlags(SF_MOV_OPEN) && GetMoverState() == MOVER_POS2)) {
|
||||||
if (trigger.Trigger != __NULL__) {
|
for (entity f = world; (f = find(f, ::targetname, targetClose));) {
|
||||||
trigger.Trigger(this, TRIG_TOGGLE);
|
NSEntity trigger = (NSEntity)f;
|
||||||
|
if (trigger.Trigger != __NULL__) {
|
||||||
|
trigger.Trigger(this, TRIG_TOGGLE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* we arrived at our starting position within the map */
|
||||||
|
if (GetMoverState() == MOVER_POS1) {
|
||||||
if (m_strSndStop) {
|
if (m_strSndStop) {
|
||||||
StartSoundDef(m_strSndStop, CHAN_VOICE, true);
|
StartSoundDef(m_strSndStop, CHAN_VOICE, true);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue