From f46ec64958a66b7cde9df55e98eb10cc62dba2ba Mon Sep 17 00:00:00 2001 From: Monster Iestyn <iestynjealous@ntlworld.com> Date: Mon, 8 Aug 2016 21:17:51 +0100 Subject: [PATCH] each SF_ flag can be set by their own parameters again, does not replace "flags" but is an alternative to it e.g.: super = 1 for SF_SUPER, noskid = 1 for SF_NOSKID, machine = 1 for SF_MACHINE --- src/r_things.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/src/r_things.c b/src/r_things.c index c3a7ac2719..942f6b66eb 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -2666,6 +2666,27 @@ void R_AddSkins(UINT16 wadnum) GETFLOAT(camerascale) #undef GETFLOAT +#define GETFLAG(field, flag) else if (!stricmp(stoken, #field)) { \ + if (atoi(value) == 1) \ + skin->flags |= flag; \ + else \ + skin->flags &= ~flag; \ +} + // parameters for individual character flags + GETFLAG(super, SF_SUPER) + GETFLAG(superanims, SF_SUPERANIMS) + GETFLAG(superspin, SF_SUPERSPIN) + GETFLAG(hires, SF_HIRES) + GETFLAG(noskid, SF_NOSKID) + GETFLAG(nospeedadjust, SF_NOSPEEDADJUST) + GETFLAG(runonwater, SF_RUNONWATER) + GETFLAG(nojumpspin, SF_NOJUMPSPIN) + GETFLAG(nojumpdamage, SF_NOJUMPDAMAGE) + GETFLAG(stompdamage, SF_STOMPDAMAGE) + GETFLAG(mariodamage, SF_MARIODAMAGE) + GETFLAG(machine, SF_MACHINE) +#undef GETFLAG + else // let's check if it's a sound, otherwise error out { boolean found = false; -- GitLab