Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] Setting 'rival' to 1 for rage_cloneattack causes spawned players to alternatingly spawn in both teams #218

Open
naydef opened this issue Aug 29, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@naydef
Copy link
Contributor

naydef commented Aug 29, 2024

That's one issue I introduced, it seems

Fix

@@ -2787,7 +2787,6 @@ public Action Timer_RemoveItem(Handle timer, DataPack pack)
 void Rage_CloneAttack(int client, ConfigData cfg)
 {
 	int team = GetClientTeam(client);
-
 	float pos[3];
 	GetEntPropVector(client, Prop_Send, "m_vecOrigin", pos);
 
@@ -2962,6 +2961,7 @@ void SpawnCloneList(int[] clients, int &amount, int &cap, ConfigData cfg, int ow
 	cap -= amount;
 
 	float vel[3];
+	if(rivalTeam) team = (team == 2) ? 3 : 2;
 	for(int i; i < amount; i++)
 	{
 		CloneLastTeam[clients[i]] = GetClientTeam(clients[i]);
@@ -2969,9 +2969,6 @@ void SpawnCloneList(int[] clients, int &amount, int &cap, ConfigData cfg, int ow
 		if(IsPlayerAlive(clients[i]))
 			ForcePlayerSuicide(clients[i]);
 
-		if(rivalTeam)
-			team = (team == 2) ? 3 : 2;
-
 		if(cfg)
 			FF2R_CreateBoss(clients[i], cfg, team);
 
@naydef naydef added the bug Something isn't working label Aug 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant