Skip to content

Commit 0c4cc89

Browse files
committed
lasermine: make throw trace ignore npcs, only look at world
1 parent ce19cde commit 0c4cc89

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

src/game/shared/swarm/asw_weapon_laser_mines.cpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -189,20 +189,20 @@ void CASW_Weapon_Laser_Mines::DelayedAttack( void )
189189
Vector vecPerpendicular;
190190
VectorRotate( vecAiming, QAngle( 0, 90, 0 ), vecPerpendicular );
191191
Vector vecNewDest = vecDest + vecPerpendicular * ( ( i == 0 ) ? 32 : -32 );
192-
UTIL_TraceLine( vecDest, vecNewDest, MASK_SOLID, pMarine, COLLISION_GROUP_NONE, &tr ); // trace out to the sides
192+
UTIL_TraceLine( vecDest, vecNewDest, MASK_SOLID, pMarine, COLLISION_GROUP_DEBRIS, &tr ); // trace out to the sides
193193
if ( tr.startsolid )
194194
continue;
195195

196196
if ( !tr.DidHit() )
197197
{
198198
// trace down again
199199
vecDest = vecNewDest;
200-
UTIL_TraceLine( vecDest, vecDest - Vector( 0, 0, 128 ), MASK_SOLID, pMarine, COLLISION_GROUP_NONE, &tr );
200+
UTIL_TraceLine( vecDest, vecDest - Vector( 0, 0, 128 ), MASK_SOLID, pMarine, COLLISION_GROUP_DEBRIS, &tr );
201201
}
202202
}
203203
else
204204
{
205-
UTIL_TraceLine( vecDest, vecDest - Vector( 0, 0, 128 ), MASK_SOLID, pMarine, COLLISION_GROUP_NONE, &tr );
205+
UTIL_TraceLine( vecDest, vecDest - Vector( 0, 0, 128 ), MASK_SOLID, pMarine, COLLISION_GROUP_DEBRIS, &tr );
206206
}
207207
if ( tr.startsolid )
208208
continue;
@@ -213,13 +213,13 @@ void CASW_Weapon_Laser_Mines::DelayedAttack( void )
213213
}
214214
else
215215
{
216-
UTIL_TraceLine( vecSrc, vecSrc + vecMineAiming * flDeployDistance, MASK_SOLID, pMarine, COLLISION_GROUP_NONE, &tr );
216+
UTIL_TraceLine( vecSrc, vecSrc + vecMineAiming * flDeployDistance, MASK_SOLID, pMarine, COLLISION_GROUP_DEBRIS, &tr );
217217

218218
if ( tr.startsolid ) // if we started in solid, trace again from the marine's center
219219
{
220220
vecSrc.x = pMarine->WorldSpaceCenter().x;
221221
vecSrc.y = pMarine->WorldSpaceCenter().y;
222-
UTIL_TraceLine( vecSrc, vecSrc + vecMineAiming * flDeployDistance, MASK_SOLID, pMarine, COLLISION_GROUP_NONE, &tr );
222+
UTIL_TraceLine( vecSrc, vecSrc + vecMineAiming * flDeployDistance, MASK_SOLID, pMarine, COLLISION_GROUP_DEBRIS, &tr );
223223
if ( tr.startsolid )
224224
continue;
225225
}
@@ -232,7 +232,7 @@ void CASW_Weapon_Laser_Mines::DelayedAttack( void )
232232
if ( vecDest.DistTo( vecSrc ) > flDeployDistance )
233233
{
234234
trace_t tr2;
235-
UTIL_TraceLine( tr.endpos, tr.endpos + Vector( 0, 0, -128 ), MASK_SOLID, pMarine, COLLISION_GROUP_NONE, &tr2 );
235+
UTIL_TraceLine( tr.endpos, tr.endpos + Vector( 0, 0, -128 ), MASK_SOLID, pMarine, COLLISION_GROUP_DEBRIS, &tr2 );
236236
tr = tr2;
237237
}
238238
else
@@ -244,20 +244,20 @@ void CASW_Weapon_Laser_Mines::DelayedAttack( void )
244244
Vector vecPerpendicular;
245245
VectorRotate( vecAiming, QAngle( 0, 90, 0 ), vecPerpendicular );
246246
Vector vecNewDest = vecDest + vecPerpendicular * ( ( i == 0 ) ? 32 : -32 );
247-
UTIL_TraceLine( vecDest, vecNewDest, MASK_SOLID, pMarine, COLLISION_GROUP_NONE, &tr ); // trace out to the sides
247+
UTIL_TraceLine( vecDest, vecNewDest, MASK_SOLID, pMarine, COLLISION_GROUP_DEBRIS, &tr ); // trace out to the sides
248248
if ( tr.startsolid )
249249
continue;
250250

251251
if ( !tr.DidHit() )
252252
{
253253
// trace down again
254254
vecDest = vecNewDest;
255-
UTIL_TraceLine( vecDest, vecDest - Vector( 0, 0, 128 ), MASK_SOLID, pMarine, COLLISION_GROUP_NONE, &tr );
255+
UTIL_TraceLine( vecDest, vecDest - Vector( 0, 0, 128 ), MASK_SOLID, pMarine, COLLISION_GROUP_DEBRIS, &tr );
256256
}
257257
}
258258
else
259259
{
260-
UTIL_TraceLine( vecDest, vecDest - Vector( 0, 0, 128 ), MASK_SOLID, pMarine, COLLISION_GROUP_NONE, &tr );
260+
UTIL_TraceLine( vecDest, vecDest - Vector( 0, 0, 128 ), MASK_SOLID, pMarine, COLLISION_GROUP_DEBRIS, &tr );
261261
}
262262
}
263263

0 commit comments

Comments
 (0)