mirror of
https://github.com/openmoh/openmohaa.git
synced 2025-04-28 21:57:57 +03:00
Set the door speed based on the door type
This commit is contained in:
parent
4da50a78d5
commit
aa118bceb3
1 changed files with 8 additions and 3 deletions
|
@ -344,9 +344,6 @@ Door::Door()
|
|||
|
||||
SetDoorType("wood");
|
||||
|
||||
traveltime = 1.0f;
|
||||
speed = 1.0f / traveltime;
|
||||
|
||||
wait = (spawnflags & DOOR_TOGGLE) ? 0 : 3;
|
||||
dmg = 0;
|
||||
|
||||
|
@ -394,6 +391,14 @@ void Door::SetDoorType(str s)
|
|||
SetCloseEndSound("door_" + s + "_close_stop");
|
||||
|
||||
SetLockedSound("door_" + s + "_locked");
|
||||
|
||||
if (s == "wood") {
|
||||
traveltime = 1.0;
|
||||
} else if (s == "metal") {
|
||||
traveltime = 1.5;
|
||||
}
|
||||
|
||||
speed = 1.0 / traveltime;
|
||||
}
|
||||
|
||||
void Door::EventDoorType(Event *ev)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue