I have an entity that flies through the sky but has gravity. (It's a mortar shell)
The thing is, I'd like it to go through void. I already make it ignore sky so it basically bounces off of void right now. I'd like to be able to detect when the entity is hitting void and just make it go through.
Right now, as far as I know, it's bouncing off of void because it is MOVETYPE_TOSS
I've tried the other movetypes, but there is no movetype that has gravity but does not collide with void (but does collide with everything else)
Code:
// pev(entity, pev_movetype) values
#define MOVETYPE_NONE 0 // Never moves
#define MOVETYPE_WALK 3 // Player only - moving on the ground
#define MOVETYPE_STEP 4 // Gravity, special edge handling -- monsters use this
#define MOVETYPE_FLY 5 // No gravity, but still collides with stuff
#define MOVETYPE_TOSS 6 // Gravity/Collisions
#define MOVETYPE_PUSH 7 // No clip to world, push and crush
#define MOVETYPE_NOCLIP 8 // No gravity, no collisions, still do velocity/avelocity
#define MOVETYPE_FLYMISSILE 9 // Extra size to monsters
#define MOVETYPE_BOUNCE 10 // Just like Toss, but reflect velocity when contacting surfaces
#define MOVETYPE_BOUNCEMISSILE 11 // Bounce w/o gravity
#define MOVETYPE_FOLLOW 12 // Track movement of aiment
#define MOVETYPE_PUSHSTEP 13 // BSP model that needs physics/world collisions (uses nearest hull for world collision)
Toss works for everything but the void bit. But is there anything that is called when the entity detects void and bounces that I can hook and supercede?
This way I can get a true mortar arch, and make the plugin very very useful.
Thanks guys.
__________________