Commits

Ryan Stecker committed 2122cd0

Fix pair hud location.
Add rocket collision rules
Fix buddy not teleporting to jump.

Comments (0)

Files changed (2)

 }
 
 
-// todo: do we still need this?
-public Action:CH_ShouldCollide( ent1, ent2, &bool:result )
-{
-	if ( !IsPluginEnabled() )
-		return Plugin_Continue; // use the game's result
-		
-	if ( IsValidClient( ent1 ) && IsValidClient( ent2 ) )
-	{
-		// control entity collision between two valid players
-		if ( ( GetPairBuddy( ent1 ) == ent2 ) || ( GetPairBuddy( ent2 ) == ent1 ) )
-		{
-			// if they're paired to each other, force them to collide
-			// this magically works for projectiles too!
-			result = true;
-			return Plugin_Handled;
-		}
-		
-		// unpaired players don't collide
-		result = false;
-		return Plugin_Handled;
-	}
-	
-	// otherwise, follow what the game wants
-	return Plugin_Continue;
-}
-
 //
 // this forward is from the required collisionhook extension
 // this is a filter hook when the server attempts to do traces
 		if ( ( GetPairBuddy( ent1 ) == ent2 ) || ( GetPairBuddy( ent2 ) == ent1 ) )
 		{
 			// if they're paired to each other, force them to collide
-			// this magically works for projectiles too!
+			// this magically works for demo nades!
 			result = true;
 			return Plugin_Handled;
 		}
 	}
 	
+	// all other projectile cases need to check ent owners
+	if ( IsValidClient( ent2 ) && ( GetEntityOwner( ent1 ) == GetPairBuddy( ent2 ) ) )
+	{
+		result = true;
+		return Plugin_Handled;
+	}
+	
+	if ( IsValidClient( ent1 ) && ( GetEntityOwner( ent2 ) == GetPairBuddy( ent1 ) ) )
+	{
+		result = true;
+		return Plugin_Handled;
+	}
+	
 	// otherwise, everything else doesn't collide
 	result = false;
 	return Plugin_Handled;
 
 public Action:Timer_ShowPairs( Handle:hTimer )
 {
-	SetHudTextParams( 0.80, -1.0, 1.0, 255, 255, 255, 255 );
+	SetHudTextParams( -1.0, 0.875, 1.0, 255, 255, 255, 255 );
 	
 	for ( new i = 1 ; i <= MaxClients ; ++i )
 	{

include/coopjump.inc

 	
 	// set the client's current jump and teleport them to it
 	SetCurrentJump( client, jumpIndex );
+	SetCurrentJump( buddy, jumpIndex );
 }
 
 stock GetCurrentJump( client )