forked from teamnwah/openmw-tes3coop
[Client] Send ObjectTrap packets when disarming traps with keys & probes
This commit is contained in:
parent
32879adc5b
commit
20a72ec807
3 changed files with 39 additions and 0 deletions
|
@ -185,6 +185,19 @@ namespace MWClass
|
|||
"Disarm Trap", 1.0f, 1.0f, MWBase::SoundManager::Play_TypeSfx,
|
||||
MWBase::SoundManager::Play_Normal);
|
||||
isTrapped = false;
|
||||
|
||||
/*
|
||||
Start of tes3mp addition
|
||||
|
||||
Send an ID_OBJECT_TRAP packet every time a trap is disarmed
|
||||
*/
|
||||
mwmp::WorldEvent *worldEvent = mwmp::Main::get().getNetworking()->getWorldEvent();
|
||||
worldEvent->reset();
|
||||
worldEvent->addObjectTrap(ptr, ptr.getRefData().getPosition(), true);
|
||||
worldEvent->sendObjectTrap();
|
||||
/*
|
||||
End of tes3mp addition
|
||||
*/
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -170,6 +170,19 @@ namespace MWClass
|
|||
"Disarm Trap", 1.0f, 1.0f, MWBase::SoundManager::Play_TypeSfx,
|
||||
MWBase::SoundManager::Play_Normal);
|
||||
isTrapped = false;
|
||||
|
||||
/*
|
||||
Start of tes3mp addition
|
||||
|
||||
Send an ID_OBJECT_TRAP packet every time a trap is disarmed
|
||||
*/
|
||||
mwmp::WorldEvent *worldEvent = mwmp::Main::get().getNetworking()->getWorldEvent();
|
||||
worldEvent->reset();
|
||||
worldEvent->addObjectTrap(ptr, ptr.getRefData().getPosition(), true);
|
||||
worldEvent->sendObjectTrap();
|
||||
/*
|
||||
End of tes3mp addition
|
||||
*/
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -126,6 +126,19 @@ namespace MWMechanics
|
|||
resultSound = "Disarm Trap";
|
||||
resultMessage = "#{sTrapSuccess}";
|
||||
mActor.getClass().skillUsageSucceeded(mActor, ESM::Skill::Security, 0);
|
||||
|
||||
/*
|
||||
Start of tes3mp addition
|
||||
|
||||
Send an ID_OBJECT_TRAP packet every time a trap is disarmed
|
||||
*/
|
||||
mwmp::WorldEvent *worldEvent = mwmp::Main::get().getNetworking()->getWorldEvent();
|
||||
worldEvent->reset();
|
||||
worldEvent->addObjectTrap(trap, trap.getRefData().getPosition(), true);
|
||||
worldEvent->sendObjectTrap();
|
||||
/*
|
||||
End of tes3mp addition
|
||||
*/
|
||||
}
|
||||
else
|
||||
resultMessage = "#{sTrapFail}";
|
||||
|
|
Loading…
Reference in a new issue