The Dink Network

Reply to Re: sp_flying through all hardness?

If you don't have an account, just leave the password field blank.
Username:
Password:
Subject:
Antispam: Enter Dink Smallwood's last name (surname) below.
Formatting: :) :( ;( :P ;) :D >( : :s :O evil cat blood
Bold font Italic font hyperlink Code tags
Message:
 
 
March 11th, 10:30 AM
custom_robj.png
Robj
Jester He/Him Australia
You feed the madness, and it feeds on you. 
The problem you're experiencing is that the sp_move_nohard value resets on any wait or callback, so it has to be set at the time of the damage proc to work. You can also make it so the entire damage procedure is ignored at the start of the damage proc should the missile encounter yellow hardness as well, this will result in what I think you're trying to achieve; the missile will fly over yellow hardness and not trigger any of the damage procedure of the missile on contact.

Add this to the beginning of the damage proc, I tested and it works for fireball so it should work for any other missiles you're cooking up for your dmod:

 sp_brain(&missile_target, -1);
 if (&return < 0)
 {
  sp_move_nohard(&current_sprite, 1);
  return;
 }


Basically what this will do is, when the missile tries to run the damage proc on hardness it will check the brain. Hardness doesn't have a brain so it actually returns the value "-1", rather than check for that specifically I just checked for <= 0 which works. Then it assures move_nohard is set to 1, and "return;" is run, preventing any of the actual damage proc from running.

This works for sp_mx/my and ordinary sp_dir/speed missiles as well.