May 6, 2006 (Changes by Graf Zahl)

- Converted a_zombie.cpp and most of a_strifestuff.cpp to DECORATE.
- Converted a_strifekeys.cpp to DECORATE and moved the pickup messages to the
  string table.
- Removed the WIF_HITS_GHOSTS weapon flag and replaced it with MF2_THRUGHOST. 
  There is no need to keep two flags around with virtually the same meaning.
- Changed the ShadowArmor to use the VISIBILITYPULSE flag to change its translucency.
  It looks much better now than the cheap code pointer based blinking it used before.
- Converted most of a_strifeitems.cpp to DECORATE and moved the pickup messages 
  to the string table.
- Converted a_strifearmor.cpp to DECORATE and moved the pickup messages to the
  string table.
- Moved the messages for killing spectres to the string table.
- Converted the quest items to DECORATE. Also changed A_GiveQuestItem to get
  the messages it prints from the string table instead of the quest item's tag
  string.

May 5, 2006 (Changes by Graf Zahl)
- Removed the hopelessly outdated thingdef_doc.txt file from the repository.
- Converted a_peasant.cpp and a_ratbuddy.cpp to DECORATE.
- Fixed: C_DoKey didn't treat an empty string as 'no binding' when checking for
  valid double bindings.
- Converted a_merchants.cpp to DECORATE.
- Added MF5_NODAMAGE flag to generalize the behavior of Strife's merchants which
  can be shot but take no damage from getting hurt.
- Converted a_beggars.cpp to DECORATE.
- Added an Inventory.GiveQuest property. This makes it possible to define all of
  Strife's original items that also give a quest item in DECORATE but it is also 
  useful to define items like the ones in Day of the Acolyte without ugly workarounds.
- Added a Tag property and Strife teaser conversation IDs to DECORATE so now it is 
  possible to define many of Strife's items.
- Added a FastSpeed property to DECORATE so that projectiles can finally be
  assigned a higher speed for fast mode.
- Added a ACS_LockedExecuteDoor special. It is basically the same as the existing
  ACS_LockedExecute but it uses the 'door' message instead of 'remote'. This
  cannot be integrated into ACS_LockedExecute because all its arguments are already
  in use.
- Added a fully customizable A_CustomMeleeAttack function for DECORATE.


SVN r83 (trunk)
This commit is contained in:
Christoph Oelckers 2006-05-07 00:27:22 +00:00
commit 605a9a7715
51 changed files with 4047 additions and 5982 deletions

View file

@ -70,6 +70,7 @@ static FRandom pr_camissile ("CustomActorfire");
static FRandom pr_camelee ("CustomMelee");
static FRandom pr_cabullet ("CustomBullet");
static FRandom pr_cajump ("CustomJump");
static FRandom pr_custommelee ("CustomMelee2");
static FRandom pr_cwbullet ("CustomWpBullet");
static FRandom pr_cwjump ("CustomWpJump");
static FRandom pr_cwpunch ("CustomWpPunch");
@ -660,6 +661,44 @@ void A_CustomBulletAttack (AActor *self)
}
}
//==========================================================================
//
// A fully customizable melee attack
//
//==========================================================================
void A_CustomMeleeAttack (AActor *self)
{
int index=CheckIndex(6);
if (index<0) return;
int Multiplier = EvalExpressionI (StateParameters[index], self);
int Modulus = EvalExpressionI (StateParameters[index+1], self);
int Adder = EvalExpressionI (StateParameters[index+2], self);
int MeleeSound=StateParameters[index+3];
const char * DamageType = (const char*)StateParameters[index+4];
bool bleed = EvalExpressionN (StateParameters[index+5], self);
int mod;
// This needs to be redesigned once the customizable damage type system is working
if (DamageType == NULL) mod=MOD_HIT;
else if (!stricmp(DamageType, "Fire")) mod=MOD_FIRE;
else if (!stricmp(DamageType, "Ice")) mod=MOD_ICE;
else if (!stricmp(DamageType, "Disintegrate")) mod=MOD_DISINTEGRATE;
else mod=MOD_HIT;
if (!self->target)
return;
A_FaceTarget (self);
if (self->CheckMeleeRange ())
{
int damage = ((pr_custommelee()%Modulus)*Multiplier)+Adder;
if (MeleeSound) S_SoundID (self, CHAN_WEAPON, MeleeSound, 1, ATTN_NORM);
P_DamageMobj (self->target, self, self, damage, MOD_HIT);
if (bleed) P_TraceBleed (damage, self->target, self);
}
}
//==========================================================================
//
// State jump function
@ -1045,7 +1084,7 @@ void A_SpawnItem(AActor * self)
if (index<0) return;
const TypeInfo * missile= TypeInfo::FindType((const char *)StateParameters[index]);
int distance = EvalExpressionI (StateParameters[index+1], self);
fixed_t distance = EvalExpressionF (StateParameters[index+1], self);
fixed_t zheight = fixed_t(EvalExpressionF (StateParameters[index+2], self) * FRACUNIT);
bool useammo = EvalExpressionN (StateParameters[index+3], self);
@ -1263,7 +1302,7 @@ void A_SetTranslucent(AActor * self)
if (mode != STYLE_Fuzzy)
{
if (self->alpha == 0) mode = STYLE_None;
else if (mode == STYLE_Translucent && self->alpha == FRACUNIT) mode = STYLE_Normal;
else if (mode == STYLE_Translucent && self->alpha >= FRACUNIT) mode = STYLE_Normal;
}
self->RenderStyle=mode;