diff options
author | Nipun Garg | 2019-06-28 03:44:55 +0530 |
---|---|---|
committer | Eugene Sandulenko | 2019-09-03 17:17:03 +0200 |
commit | 9182fef47dd0ec2a12bbe125bb1b682d0aea3968 (patch) | |
tree | ab12ca79204a33efcf5f28c71533caa345daf810 /engines | |
parent | 55c78f1f53a3e5517dfa80c4aadd95e05e7ba751 (diff) | |
download | scummvm-rg350-9182fef47dd0ec2a12bbe125bb1b682d0aea3968.tar.gz scummvm-rg350-9182fef47dd0ec2a12bbe125bb1b682d0aea3968.tar.bz2 scummvm-rg350-9182fef47dd0ec2a12bbe125bb1b682d0aea3968.zip |
HDB: Add stunEnemy()
Diffstat (limited to 'engines')
-rw-r--r-- | engines/hdb/ai-funcs.cpp | 51 | ||||
-rw-r--r-- | engines/hdb/ai.h | 1 |
2 files changed, 52 insertions, 0 deletions
diff --git a/engines/hdb/ai-funcs.cpp b/engines/hdb/ai-funcs.cpp index 81419fa98b..1180150ab6 100644 --- a/engines/hdb/ai-funcs.cpp +++ b/engines/hdb/ai-funcs.cpp @@ -705,6 +705,57 @@ void AI::killPlayer(Death method) { warning("STUB: killPlayer: Stop Music"); } +void AI::stunEnemy(AIEntity *e, int time) { + int ns = 0; + + if (e->stunnedWait) + ns = 1; + + e->stunnedWait = g_hdb->getTimeSlice() + 1000 * time; + + // Already stunned? If not, play sound + if (!ns) + switch (e->type) { + case AI_BUZZFLY: + warning("STUB: stunEnemy: Play sound"); + break; + case AI_PUSHBOT: + warning("STUB: stunEnemy: Play sound"); + break; + case AI_MEERKAT: + warning("STUB: stunEnemy: Play sound"); + break; + case AI_FATFROG: + warning("STUB: stunEnemy: Play sound"); + break; + case AI_OMNIBOT: + case AI_SHOCKBOT: + case AI_LISTENBOT: + warning("STUB: stunEnemy: Play sound"); + break; + case AI_GOODFAIRY: + warning("STUB: stunEnemy: Play sound"); + break; + case AI_BADFAIRY: + warning("STUB: stunEnemy: Play sound"); + break; + case AI_ICEPUFF: + warning("STUB: stunEnemy: Play sound"); + break; + case AI_RIGHTBOT: + warning("STUB: stunEnemy: Play sound"); + break; + case AI_BOOMBARREL: + warning("STUB: stunEnemy: Play sound"); + break; + case AI_CHICKEN: // Fall through + warning("STUB: stunEnemy: Play sound"); + default: + warning("STUB: stunEnemy: Play sound"); + break; + } +} + /* Note from original: Moves the entity along toward its goal, sets current frame to draw diff --git a/engines/hdb/ai.h b/engines/hdb/ai.h index ab0abe6af3..a2f59e9bea 100644 --- a/engines/hdb/ai.h +++ b/engines/hdb/ai.h @@ -718,6 +718,7 @@ public: void setEntityGoal(AIEntity *e, int x, int y); void initAllEnts(); void killPlayer(Death method); + void stunEnemy(AIEntity *e, int time); void animateEntity(AIEntity *e); void animEntFrames(AIEntity *e); |