forked from mirror/openmw-tes3mp
Apply trap magic effects
This commit is contained in:
parent
1ad02d68a7
commit
a47c76001c
2 changed files with 4 additions and 2 deletions
|
@ -13,6 +13,7 @@
|
||||||
#include "../mwworld/containerstore.hpp"
|
#include "../mwworld/containerstore.hpp"
|
||||||
#include "../mwworld/customdata.hpp"
|
#include "../mwworld/customdata.hpp"
|
||||||
#include "../mwworld/cellstore.hpp"
|
#include "../mwworld/cellstore.hpp"
|
||||||
|
#include "../mwworld/actionapply.hpp"
|
||||||
#include "../mwworld/actionopen.hpp"
|
#include "../mwworld/actionopen.hpp"
|
||||||
#include "../mwworld/physicssystem.hpp"
|
#include "../mwworld/physicssystem.hpp"
|
||||||
#include "../mwworld/player.hpp"
|
#include "../mwworld/player.hpp"
|
||||||
|
@ -148,7 +149,7 @@ namespace MWClass
|
||||||
{
|
{
|
||||||
// Trap activation goes here
|
// Trap activation goes here
|
||||||
std::cout << "Activated trap: " << ptr.getCellRef().mTrap << std::endl;
|
std::cout << "Activated trap: " << ptr.getCellRef().mTrap << std::endl;
|
||||||
boost::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction);
|
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionApply(actor, ptr.getCellRef().mTrap));
|
||||||
action->setSound(trapActivationSound);
|
action->setSound(trapActivationSound);
|
||||||
ptr.getCellRef().mTrap = "";
|
ptr.getCellRef().mTrap = "";
|
||||||
return action;
|
return action;
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include "../mwworld/ptr.hpp"
|
#include "../mwworld/ptr.hpp"
|
||||||
#include "../mwworld/nullaction.hpp"
|
#include "../mwworld/nullaction.hpp"
|
||||||
#include "../mwworld/failedaction.hpp"
|
#include "../mwworld/failedaction.hpp"
|
||||||
|
#include "../mwworld/actionapply.hpp"
|
||||||
#include "../mwworld/actionteleport.hpp"
|
#include "../mwworld/actionteleport.hpp"
|
||||||
#include "../mwworld/actiondoor.hpp"
|
#include "../mwworld/actiondoor.hpp"
|
||||||
#include "../mwworld/cellstore.hpp"
|
#include "../mwworld/cellstore.hpp"
|
||||||
|
@ -110,7 +111,7 @@ namespace MWClass
|
||||||
// Trap activation
|
// Trap activation
|
||||||
std::cout << "Activated trap: " << ptr.getCellRef().mTrap << std::endl;
|
std::cout << "Activated trap: " << ptr.getCellRef().mTrap << std::endl;
|
||||||
|
|
||||||
boost::shared_ptr<MWWorld::Action> action(new MWWorld::FailedAction);
|
boost::shared_ptr<MWWorld::Action> action(new MWWorld::ActionApply(actor, ptr.getCellRef().mTrap));
|
||||||
action->setSound(trapActivationSound);
|
action->setSound(trapActivationSound);
|
||||||
ptr.getCellRef().mTrap = "";
|
ptr.getCellRef().mTrap = "";
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue