Rename health/armour related commands

This commit is contained in:
Ryan Dwyer
2019-12-29 18:13:33 +10:00
parent 90df2a2910
commit 3bbad9cae5
28 changed files with 431 additions and 413 deletions
+20 -2
View File
@@ -775,12 +775,30 @@
mkshort(0x0095), \
newid,
#define set_chr_health(chr, value) \
/**
* Sets the limit of how much health a chr or heli can take before they die.
*
* In most cases the value is assigned to the chr given by the chr argument,
* however if the command is run by an object (eg. hovercar or heli) it will be
* assigned to the object itself.
*/
#define set_chr_maxdamage(chr, value) \
mkshort(0x0096), \
chr, \
mkshort(value),
#define set_armor(value) \
/**
* Easy to understand, but technically incorrect explanation:
*
* Adds health to the chr. If this causes the chr to exceed full health
* (ie. maxdamage) then the remainder is applied as armor.
*
* Relatively difficult to understand, but technically correct explanation:
*
* Reduces the damage that the chr has taken by the given value. This value
* may become negative, which has the effect of having body armor.
*/
#define add_health_or_armor(value) \
mkshort(0x0097), \
mkshort(value),
+2 -2
View File
@@ -152,8 +152,8 @@
/*0x0093*/ bool aiSetViewDistance(void);
/*0x0094*/ bool aiSetGrenadeProbability(void);
/*0x0095*/ bool aiSetChrNum(void);
/*0x0096*/ bool ai0096(void);
/*0x0097*/ bool ai0097(void);
/*0x0096*/ bool aiSetMaxDamage(void);
/*0x0097*/ bool aiAddHealth(void);
/*0x0098*/ bool aiSetReactionSpeed(void);
/*0x0099*/ bool aiSetRecoverySpeed(void);
/*0x009a*/ bool aiSetAccuracy(void);