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

Solid flags, takedamage, etc?


  
 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Author Message
404UserNotFound
BANNED
Join Date: Dec 2011
Old 02-25-2015 , 07:21   Solid flags, takedamage, etc?
Reply With Quote #1

So I'm still working on the TF2 grenade plugins, getting ready to release the Dynamite Pack publicly (foregoing my original plan of finishing all the various grenades and releasing one big plugin), but I've got questions regarding some prop related things. I'm once again peering at the tf_weaponbase_grenadeproj.cpp file from the 2008 TF2 source code leak, and seeing things I need to set in the code for "accuracy" of the grenades in general;
PHP Code:
// So it will collide with physics props!
SetSolidFlagsFSOLID_NOT_STANDABLE );
SetSolidSOLID_BBOX );    

AddEffectsEF_NOSHADOW );

// Set the movement type.
SetCollisionGroupTF_COLLISIONGROUP_GRENADES );

// Don't collide with players on the owner's team for the first bit of our life
m_flCollideWithTeammatesTime gpGlobals->curtime 0.25;
m_bCollideWithTeammates false;

VPhysicsInitNormalSOLID_BBOX0false );

m_takedamage DAMAGE_EVENTS_ONLY
What's the SourcePawn equivalent of any of the above?

As well, the orange box trailer shows the resulting Dynamite Sticks emanating from the explosion site of the pack, but they all seem to emanate standing up vertically. Here's the bomblet spawning code from the source code. What part of it controls the vertical emanation? Currently, they spawn when the initial explosion takes place, and the explosion seems to shoot them wildly in many directions (which is quite annoying). I do use the vecVelocity bit in my plugin currently, but I can't tell if they spawn vertically due to the env_explosion tossing them about wildly.

PHP Code:
// Create the bomblets.
for ( int iBomb 0iBomb TF_WEAPON_GRENADE_MIRV_BOMB_COUNT; ++iBomb )
{
    
Vector vecSrc pTrace->endpos Vector001.0f ); 
    
Vector vecVelocityrandom->RandomFloat( -75.0f75.0f ) * 3.0f,
                        
random->RandomFloat( -75.0f75.0f ) * 3.0f,
                        
random->RandomFloat30.0f70.0f ) * 5.0f );
    
Vector vecZero0,0,);
    
CTFPlayer *pPlayer ToTFPlayerGetThrower() );
    
float flTime 2.0f random->RandomFloat0.0f1.0f );

    
CTFGrenadeMirvBomb::CreatevecSrcGetAbsAngles(), vecVelocityvecZeropPlayerflTime );

Finally, I've got a side question. Right now, I'm using a thrown prop_physics_override for the dynamite pack and resulting sticks. I believe the source code utilizes prop_physics_multiplayer, but I'm not sure if that makes any difference.

Last edited by 404UserNotFound; 02-25-2015 at 07:23.
404UserNotFound is offline
 



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 16:18.


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