Added the description of new metarule2_explosions mode to function notes.txt.

Fixed a typo in metarule2_explosions error message.
This commit is contained in:
NovaRain
2018-05-30 21:07:51 +08:00
parent 0e715236bf
commit 2f6f0d8b28
3 changed files with 7 additions and 3 deletions
@@ -231,6 +231,10 @@ was made as a dirty easy hack to allow dynamically change some explosion paramet
> void set_attack_is_explosion_fire > void set_attack_is_explosion_fire
- if you call this right before using a weapon with fire damage type, it will produce explosion effects (and radius damage) just like "explosion" type, but all targets will still receive fire damage. - if you call this right before using a weapon with fire damage type, it will produce explosion effects (and radius damage) just like "explosion" type, but all targets will still receive fire damage.
> void set_explosion_radius(grenade, rocket)
- sets a permanent radius of the explosion for grenades and/or rockets. Passing 0 means not changing the corresponding radius.
- changed radius will be reset each time the player reloads the game.
Some utility/math functions are available: Some utility/math functions are available:
+1 -1
View File
@@ -251,7 +251,7 @@ void Explosions::init() {
dlogr(" Done", DL_INIT); dlogr(" Done", DL_INIT);
} }
DWORD tmp; DWORD tmp;
tmp = SimplePatch<DWORD>(0x4A2873, "Misc", "Dynamite_DmgMax", 50, 0, 9999); tmp = SimplePatch<DWORD>(0x4A2873, "Misc", "Dynamite_DmgMax", 50, 0, 9999);
SimplePatch<DWORD>(0x4A2878, "Misc", "Dynamite_DmgMin", 30, 0, tmp); SimplePatch<DWORD>(0x4A2878, "Misc", "Dynamite_DmgMin", 30, 0, tmp);
+2 -2
View File
@@ -109,9 +109,9 @@ void sf_reg_anim_turn_towards(OpcodeContext& ctx) {
void sf_explosions_metarule(OpcodeContext& ctx) { void sf_explosions_metarule(OpcodeContext& ctx) {
int mode = ctx.arg(0).asInt(), int mode = ctx.arg(0).asInt(),
result = ExplosionsMetaruleFunc(mode, ctx.arg(1).asInt(), ctx.arg(2).asInt()); result = ExplosionsMetaruleFunc(mode, ctx.arg(1).asInt(), ctx.arg(2).asInt());
if (result == -1) { if (result == -1) {
ctx.printOpcodeError("ExplosionsMetalure() - mode (%d) is not supported for the function.", mode); ctx.printOpcodeError("ExplosionsMetarule() - mode (%d) is not supported for the function.", mode);
} }
ctx.setReturn(result); ctx.setReturn(result);
} }