Added disable_timer checks to doors override functions

This commit is contained in:
Uleat 2017-04-08 22:35:37 -04:00
parent 58e1d9501d
commit 6ae2ff2b75

View File

@ -459,15 +459,18 @@ void Doors::NPCOpen(NPC* sender, bool alt_mode)
if(!alt_mode) { // original function if(!alt_mode) { // original function
if(!isopen) { if(!isopen) {
if (!disable_timer)
close_timer.Start(); close_timer.Start();
isopen=true; isopen=true;
} }
else { else {
close_timer.Disable(); close_timer.Disable();
if (!disable_timer)
isopen=false; isopen=false;
} }
} }
else { // alternative function else { // alternative function
if (!disable_timer)
close_timer.Start(); close_timer.Start();
isopen=true; isopen=true;
} }
@ -485,15 +488,18 @@ void Doors::ForceOpen(Mob *sender, bool alt_mode)
if(!alt_mode) { // original function if(!alt_mode) { // original function
if(!isopen) { if(!isopen) {
if (!disable_timer)
close_timer.Start(); close_timer.Start();
isopen=true; isopen=true;
} }
else { else {
close_timer.Disable(); close_timer.Disable();
if (!disable_timer)
isopen=false; isopen=false;
} }
} }
else { // alternative function else { // alternative function
if (!disable_timer)
close_timer.Start(); close_timer.Start();
isopen=true; isopen=true;
} }
@ -510,6 +516,7 @@ void Doors::ForceClose(Mob *sender, bool alt_mode)
if(!alt_mode) { // original function if(!alt_mode) { // original function
if(!isopen) { if(!isopen) {
if (!disable_timer)
close_timer.Start(); close_timer.Start();
isopen=true; isopen=true;
} }