From 294a7e4c9ce142472365b9e9c388c641cc15ec73 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Tue, 5 May 2020 18:47:07 +0200 Subject: [PATCH] - reinstated RR code after seeing that the weapon array can be shared without problems. --- source/games/duke/src/actors.cpp | 24 ++++++++++++++++++++---- source/games/duke/src/namesdyn.h | 19 +++++++++++++++++++ 2 files changed, 39 insertions(+), 4 deletions(-) diff --git a/source/games/duke/src/actors.cpp b/source/games/duke/src/actors.cpp index 2e67ab2a7..3e9140169 100644 --- a/source/games/duke/src/actors.cpp +++ b/source/games/duke/src/actors.cpp @@ -65,10 +65,14 @@ bool ceilingspace(int sectnum) { case MOONSKY1: case BIGORBIT1: - return true; + return !(g_gameType & GAMEFLAG_RRALL); + + case RR_MOONSKY1: + case RR_BIGORBIT1: + return !!(g_gameType & GAMEFLAG_RRALL); } } - return false; + return 0; } //--------------------------------------------------------------------------- @@ -85,12 +89,22 @@ bool floorspace(int sectnum) { case MOONSKY1: case BIGORBIT1: - return true; + return !(g_gameType & GAMEFLAG_RRALL); + + case RR_MOONSKY1: + case RR_BIGORBIT1: + return !!(g_gameType & GAMEFLAG_RRALL); } } - return false; + return 0; } +//--------------------------------------------------------------------------- +// +// +// +//--------------------------------------------------------------------------- + void addammo(short weapon, struct player_struct* p, short amount) { p->ammo_amount[weapon] += amount; @@ -182,6 +196,8 @@ void addweapon(struct player_struct* p, short weapon) bool ifsquished(int i, int p) { + if (g_gameType & GAMEFLAG_RRALL) return false; // this function is a no-op in RR's source. + bool squishme = false; if (sprite[i].picnum == TILE_APLAYER && ud.clipping) return false; diff --git a/source/games/duke/src/namesdyn.h b/source/games/duke/src/namesdyn.h index 83837d20a..a469fb651 100644 --- a/source/games/duke/src/namesdyn.h +++ b/source/games/duke/src/namesdyn.h @@ -3592,6 +3592,25 @@ enum dukeweapon_t_alt CHICKEN_WEAPON, }; +enum redneck_weapon_t +{ + // RR names from RedneckGDX. The reconstructed source uses the Duke names. + RIFLEGUN_WEAPON = 3, + DYNAMITE_WEAPON = 4, + CROSSBOW_WEAPON = 5, + THROWSAW_WEAPON = 6, + ALIENBLASTER_WEAPON = 7, + POWDERKEG_WEAPON = 8, + TIT_WEAPON = 9, + //HANDREMOTE_WEAPON = 10; + BUZSAW_WEAPON = 11, + BOWLING_WEAPON = 12, + MOTO_WEAPON = 13, + //BOAT_WEAPON = 14, + RATE_WEAPON = 15, + CHICKENBOW_WEAPON = 16 +}; + #define DYNAMICWEAPONMAP(Weaponnum) Weaponnum END_DUKE_NS