This is a multi-part message in MIME format.
--
[ Picked text/plain from multipart/alternative ]
I did
    if ( pOwner->GetTeamNumber() == TEAM_COMBINE )
    {
        UTIL_TraceLine( start, end, MASK_SHOT, pOwner,
COLLISION_GROUP_BLUE_WEAPONS, &tr );
    }
    else
    {
        UTIL_TraceLine( start, end, MASK_SHOT, pOwner,
COLLISION_GROUP_RED_WEAPONS, &tr );
    }

for weapon_freeze, and ShouldCollide has
    if ( collisionGroup0 == COLLISION_GROUP_RED_FORT || collisionGroup0
== COLLISION_GROUP_BLUE_FORT )
    {
        if ( collisionGroup0 == COLLISION_GROUP_RED_FORT &&
collisionGroup1 == COLLISION_GROUP_BLUE_WEAPONS )
                        return true;
        if ( collisionGroup0 == COLLISION_GROUP_BLUE_FORT &&
collisionGroup1 == COLLISION_GROUP_RED_WEAPONS )
                        return true;
        return false;
    }

But this doesn't work, it still hits it.

>Put func_fortsite in a special collision group and set up a relationship
>in gamerules::ShouldCollide() that makes it collide with specific other
>collision groups:
>
>       func_fortsite is either COLLISION_GROUP_FORTSITE_TEAM1 or
>COLLISION_GROUP_FORTSITE_TEAM2.
>
>       player weapons are either COLLISION_GROUP_TEAM1_WEAPON or
>COLLISION_GROUP_TEAM2_WEAPON.
>
>Then ShouldCollide() can do:
>       if ( collisionGroup0 == COLLISION_GROUP_FORTSITE_TEAM1 ||
>collisionGroup0 == COLLISION_GROUP_FORTSITE_TEAM2 )
>       {
>               if ( collisionGroup0 == COLLISION_GROUP_FORTSITE_TEAM1
>&& collisionGroup1 == COLLISION_GROUP_TEAM2_WEAPON )
>                       return true;
>               if ( collisionGroup0 == COLLISION_GROUP_FORTSITE_TEAM2
>&& collisionGroup1 == COLLISION_GROUP_TEAM1_WEAPON )
>                       return true;
>               return false;
>       }
>
>If you need to control specific weapons, then only put those specific
>weapons' tracelines into the collision group.  Note that the weapon
>group isn't on the entity, but passed in to the UTIL_TraceLine() call.
>The fortsite group goes on the entity.
>
>
>
>
>
>>-----Original Message-----
>>From: [EMAIL PROTECTED]
>>[mailto:[EMAIL PROTECTED] On Behalf Of Knifa
>>Sent: Thursday, February 24, 2005 2:25 PM
>>To: [email protected]
>>Subject: [hlcoders] Getting a trace to hit off a non solid entity
>>
>>Hi all.
>>
>>I've made a new brush entity called func_fortsite, when a
>>player from the other team of who's fort site this is tries
>>to fire a weapon
>>(weapon_freezer) while in this brush, it should stop.
>>
>>Right now, I have it using flags and it works all well while
>>the Solid Type is SOLID_BSP, but I want it so that you can
>>still move objects/players in this When it's at SOLID_NONE,
>>the trace doesn't hit it, so it doesn't work.
>>
>>Does anyone know what I could do, or if there's another way I
>>could do it?
>>
>>Thanks.
>>
>>-Daniel Callander
>>
>>_______________________________________________
>>To unsubscribe, edit your list preferences, or view the list
>>archives, please visit:
>>http://list.valvesoftware.com/mailman/listinfo/hlcoders
>>
>>
>>
>>
>
>_______________________________________________
>To unsubscribe, edit your list preferences, or view the list archives, please 
>visit:
>http://list.valvesoftware.com/mailman/listinfo/hlcoders
>
>
>
>
>
>

--
Knifa
SourceForts
http://knd.org.uk/sourceforts/
--

_______________________________________________
To unsubscribe, edit your list preferences, or view the list archives, please 
visit:
http://list.valvesoftware.com/mailman/listinfo/hlcoders

Reply via email to