Raised This Month: $51 Target: $400
 12% 

TF2 stopping collision damage on entity


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
Chaosxk
Veteran Member
Join Date: Aug 2010
Location: Westeros
Old 09-27-2015 , 00:55   TF2 stopping collision damage on entity
Reply With Quote #1

Hi, i've ran into an issue where spawning headless_hatman, eyeball_boss, merasmus, tf_zombie entities seem to cause some sort of random collision damage. It just happens randomly, right now i have the entities hooked on SDK_OnTakeDamagePost and setting damage to 0.0.

PHP Code:
public Action OnBossDamaged(int victimint &attackerint &inflictorfloat &damageint &damagetype) {
    
//For some reason, bosses take damage randomly from DMG_CRUSH
    
PrintToChatAll("victim: %d | attacker: %d | damage: %f | type: %d"victimattackerdamagedamagetype);
    if(
damagetype DMG_CRUSH || damagetype DMG_VEHICLE) {
        
damage 0.0;
        return 
Plugin_Changed;
    }
    return 
Plugin_Continue;

Also DMG_CRUSH seems to always do 10000.0 damage and DMG_VEHICLE always do 1000.0 damage. I'm stumped to why this even occurs.

Is there any other way to prevent the collision damage in the first place?
__________________
Chaosxk is offline
Chaosxk
Veteran Member
Join Date: Aug 2010
Location: Westeros
Old 09-27-2015 , 18:08   Re: TF2 stopping collision damage on entity
Reply With Quote #2

Fixed.

Apparently setting the bosses entities to team 5 will cause them to be hurt by collision damage from the payload carts and a trigger_hurt inside the payload carts. Setting the bosses to 0 seems to have fixed it although i have to leave monoculus at team 5, but its fine since most of the time it will be in the air.

Strange thing is, when the bosses team is 0 and is colliding with the payload carts, SDKHooks reports that it's taking damage but doesn't actually do any damage. But while on team 5, it actually does the damage.
__________________
Chaosxk is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 00:54.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode