mirror of
https://github.com/ZDoom/gzdoom-last-svn.git
synced 2025-06-04 11:10:48 +00:00
Update to ZDoom r1831:
fixed: The Dehacked flags parser fix from May 31 (r1624) was undone by yesterday's additions. Changed it so that the parser first checks for the presence of a '-' sign before deciding whether to use strtol or strtoul to convert the string into a number. - Added PinkSilver's A_LookEx fix. - added resources needed for MBF support. - removed unused score items from DECORATE file. - Fixed: Argument count for UsePuzzleItem was wrong. - Added a few things from Gez's experimental build: * MBF Dehacked emulation but removed the COMPATF_MBFDEHACKED flag because it wouldn't work and is more or less useless anyway. * MBF's dog (definition only, no sprites yet.) * User variables. There's an array of 10. They can be set and checked in both DECORATE and ACS. * Made the tag name changeable but eliminated the redundancy of having both the meta property and the individual actor's one. Having one is fully sufficient. TO BE FIXED: Names are case insensitive but this should better be case sensitive. Unfortunately there's currently nothing better than FName to store a string inside an actor without severely complicating matters. Also bumped savegame version to avoid problems with this change. * MBF grenade and bouncing code. * several compatibility options. * info CCMD to print extended actor information (not fully implemented yet) * summonmbf CCMD. * Beta BFG code pointer (but not the related missiles yet.) * PowerInvisibility enhancements. * ScoreItem with one significant change: Added a score variable that can be checked through ACS and DECORATE. The engine itself will do nothing with it. * Nailgun option for A_Explode. * A_PrintBold and A_Log. * A_SetSpecial. * Beta Lost Soul (added DoomEdNum 9037 to it) * A_Mushroom extensions * Vavoom compatible MAPINFO keynames. git-svn-id: http://mancubus.net/svn/hosted/gzdoom/trunk@452 b0f79afe-0144-0410-b225-9a4edf0717df
This commit is contained in:
parent
67a7c1b1b7
commit
2352d102e9
152 changed files with 1991 additions and 445 deletions
|
@ -560,12 +560,14 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_JumpIfArmorType)
|
|||
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Explode)
|
||||
{
|
||||
ACTION_PARAM_START(5);
|
||||
ACTION_PARAM_START(7);
|
||||
ACTION_PARAM_INT(damage, 0);
|
||||
ACTION_PARAM_INT(distance, 1);
|
||||
ACTION_PARAM_BOOL(hurtSource, 2);
|
||||
ACTION_PARAM_BOOL(alert, 3);
|
||||
ACTION_PARAM_INT(fulldmgdistance, 4);
|
||||
ACTION_PARAM_INT(nails, 5);
|
||||
ACTION_PARAM_INT(naildamage, 6);
|
||||
|
||||
if (damage < 0) // get parameters from metadata
|
||||
{
|
||||
|
@ -578,6 +580,21 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Explode)
|
|||
{
|
||||
if (distance <= 0) distance = damage;
|
||||
}
|
||||
// NailBomb effect, from SMMU but not from its source code: instead it was implemented and
|
||||
// generalized from the documentation at http://www.doomworld.com/eternity/engine/codeptrs.html
|
||||
|
||||
if (nails)
|
||||
{
|
||||
angle_t ang;
|
||||
for (int i = 0; i < nails; i++)
|
||||
{
|
||||
ang = i*(ANGLE_MAX/nails);
|
||||
// Comparing the results of a test wad with Eternity, it seems A_NailBomb does not aim
|
||||
P_LineAttack (self, ang, MISSILERANGE, 0,
|
||||
//P_AimLineAttack (self, ang, MISSILERANGE),
|
||||
naildamage, NAME_None, NAME_BulletPuff);
|
||||
}
|
||||
}
|
||||
|
||||
P_RadiusAttack (self, self->target, damage, distance, self->DamageType, hurtSource, true, fulldmgdistance);
|
||||
if (self->z <= self->floorz + (distance<<FRACBITS))
|
||||
|
@ -1675,6 +1692,47 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Print)
|
|||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// A_PrintBold
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_PrintBold)
|
||||
{
|
||||
ACTION_PARAM_START(3);
|
||||
ACTION_PARAM_STRING(text, 0);
|
||||
ACTION_PARAM_FLOAT(time, 1);
|
||||
ACTION_PARAM_NAME(fontname, 2);
|
||||
|
||||
float saved = con_midtime;
|
||||
FFont *font = NULL;
|
||||
|
||||
if (fontname != NAME_None)
|
||||
{
|
||||
font = V_GetFont(fontname);
|
||||
}
|
||||
if (time > 0)
|
||||
{
|
||||
con_midtime = time;
|
||||
}
|
||||
|
||||
C_MidPrintBold(font != NULL ? font : SmallFont, text);
|
||||
con_midtime = saved;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// A_Log
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Log)
|
||||
{
|
||||
ACTION_PARAM_START(1);
|
||||
ACTION_PARAM_STRING(text, 0);
|
||||
Printf("%s\n", text);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
|
@ -2081,6 +2139,10 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Respawn)
|
|||
{
|
||||
AActor *defs = self->GetDefault();
|
||||
self->health = defs->health;
|
||||
|
||||
// [KS] Don't keep target, because it could be self if the monster committed suicide
|
||||
self->target = NULL;
|
||||
self->LastHeard = NULL;
|
||||
|
||||
self->flags = (defs->flags & ~MF_FRIENDLY) | (self->flags & MF_FRIENDLY);
|
||||
self->flags2 = defs->flags2;
|
||||
|
@ -2769,3 +2831,92 @@ DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetArg)
|
|||
self->args[pos] = value;
|
||||
}
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// A_SetSpecial
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetSpecial)
|
||||
{
|
||||
ACTION_PARAM_START(6);
|
||||
ACTION_PARAM_INT(spec, 0);
|
||||
ACTION_PARAM_INT(arg0, 1);
|
||||
ACTION_PARAM_INT(arg1, 2);
|
||||
ACTION_PARAM_INT(arg2, 3);
|
||||
ACTION_PARAM_INT(arg3, 4);
|
||||
ACTION_PARAM_INT(arg4, 5);
|
||||
|
||||
self->special = spec;
|
||||
self->args[0] = arg0;
|
||||
self->args[1] = arg1;
|
||||
self->args[2] = arg2;
|
||||
self->args[3] = arg3;
|
||||
self->args[4] = arg4;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// A_SetVar
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_SetUserVar)
|
||||
{
|
||||
ACTION_PARAM_START(2);
|
||||
ACTION_PARAM_INT(pos, 0);
|
||||
ACTION_PARAM_INT(value, 1);
|
||||
|
||||
if (pos < 0 || pos > 9)
|
||||
return;
|
||||
|
||||
// Set the value of the specified arg
|
||||
self->uservar[pos] = value;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// A_Turn
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_Turn)
|
||||
{
|
||||
ACTION_PARAM_START(1);
|
||||
ACTION_PARAM_ANGLE(angle, 0);
|
||||
self->angle += angle;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// A_LineEffect
|
||||
//
|
||||
// This allows linedef effects to be activated inside deh frames.
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
|
||||
void P_TranslateLineDef (line_t *ld, maplinedef_t *mld);
|
||||
DEFINE_ACTION_FUNCTION_PARAMS(AActor, A_LineEffect)
|
||||
{
|
||||
ACTION_PARAM_START(2);
|
||||
ACTION_PARAM_INT(special, 0);
|
||||
ACTION_PARAM_INT(tag, 1);
|
||||
|
||||
line_t junk; maplinedef_t oldjunk;
|
||||
bool res = false;
|
||||
if (!(self->flags6 & MF6_LINEDONE)) // Unless already used up
|
||||
{
|
||||
if ((oldjunk.special = special)) // Linedef type
|
||||
{
|
||||
oldjunk.tag = tag; // Sector tag for linedef
|
||||
P_TranslateLineDef(&junk, &oldjunk); // Turn into native type
|
||||
res = !!LineSpecials[junk.special](NULL, self, false, junk.args[0],
|
||||
junk.args[1], junk.args[2], junk.args[3], junk.args[4]);
|
||||
if (res && !(junk.flags & ML_REPEAT_SPECIAL)) // If only once,
|
||||
self->flags6 |= MF6_LINEDONE; // no more for this thing
|
||||
}
|
||||
}
|
||||
ACTION_SET_RESULT(res);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue