From 212343b39041ebf679f312b403c7ad7b7a6ef40f Mon Sep 17 00:00:00 2001 From: helixhorned Date: Sat, 8 Aug 2015 07:04:11 +0000 Subject: [PATCH] Game: make BOUNCEMINE spawn FRAMEEFFECT only if moving horizontally. Also add "zshoot -4096 BOUNCEMINE" to lunatic/test/weaponvars.con to demonstrate that bouncemines can be shot. git-svn-id: https://svn.eduke32.com/eduke32@5319 1a8010ca-5511-0410-912e-c29ae57300e0 --- polymer/eduke32/source/actors.c | 5 ++++- polymer/eduke32/source/lunatic/test/weaponvars.con | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/polymer/eduke32/source/actors.c b/polymer/eduke32/source/actors.c index 483539bf6..d1f554452 100644 --- a/polymer/eduke32/source/actors.c +++ b/polymer/eduke32/source/actors.c @@ -4498,10 +4498,13 @@ ACTOR_STATIC void G_MoveActors(void) } case BOUNCEMINE__STATIC: + if (s->xvel != 0) case MORTER__STATIC: + { j = A_Spawn(i,(PLUTOPAK?FRAMEEFFECT1:FRAMEEFFECT1_13)); actor[j].t_data[0] = 3; - + } + /* fall-through */ case HEAVYHBOMB__STATIC: { int32_t p; diff --git a/polymer/eduke32/source/lunatic/test/weaponvars.con b/polymer/eduke32/source/lunatic/test/weaponvars.con index db6595115..70cb17584 100644 --- a/polymer/eduke32/source/lunatic/test/weaponvars.con +++ b/polymer/eduke32/source/lunatic/test/weaponvars.con @@ -6,6 +6,8 @@ gamevar shoots 2605 2 // RPG gamevar WEAPON1_SHOOTS 2605 0 define MORTER2 1653 +// NOTE: the custom MORTER2 doesn't spawn FRAMEEFFECT like the MORTER, which +// has some hard-wired code running. defineprojectile MORTER2 PROJ_WORKSLIKE 6150 defineprojectile MORTER2 PROJ_SPAWNS EXPLOSION2 defineprojectile MORTER2 PROJ_SOUND RPG_SHOOT @@ -32,6 +34,8 @@ definequote 400 Failed setting projectile userdata useractor notenemy 909 // tree trunk ifcount 120 { + zshoot -4096 BOUNCEMINE + // userdata: bitwise-OR in 64 getprojectile[MORTER2].userdata tmp orvar tmp 64