]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commit
func_door: fix erratic behaviour of spawned trigger field
authorbones_was_here <bones_was_here@xonotic.au>
Fri, 7 Oct 2022 12:37:58 +0000 (22:37 +1000)
committerbones_was_here <bones_was_here@xonotic.au>
Thu, 16 Feb 2023 11:07:21 +0000 (21:07 +1000)
commit93b0e9a582573edfc9eb11225e03fc835e3c39fb
treeddc5db7170205d98e85e43e72effc8911fb11a5f
parentc175fa233cf0a4d85f26587203ebd5432f7bce1a
func_door: fix erratic behaviour of spawned trigger field

This was most noticeable with door .wait <= 1 but would eventually occur
at higher wait values if players hang around in the trigger field.

Also the door(s) usually did not stay open for the full .wait time after
the player left the trigger field, as some time had passed since the
.door_finished timestamp was set.

To make this reliable AND efficient requires updating the state of the
door(s), instead of maintaining a separate state in the trigger field entity.
qcsrc/common/mapobjects/func/door.qc