etlegacy icon indicating copy to clipboard operation
etlegacy copied to clipboard

Sometimes can't vote (complain) after I was killed.

Open randomek opened this issue 4 years ago • 7 comments

In some random moments (I can't find pattern yet) I can't press F1 or F2 after my team killed me. I have to wait to timeout vote (complain) to disappeared. It's about ~ 1 to 20 probability :) All other keys works correctly.

It was in: 2.77.1-i386 and 2.78.0-i386 on x86_64 GNU/Linux.

randomek avatar Nov 01 '21 16:11 randomek

The issue is mod related, so you'll need to provide the server you connected to. Were you playing the Legacy mod on that server?

rmarquis avatar Nov 01 '21 17:11 rmarquis

I've seen this happen on Legacy mod, on TM server, haven't looked into it though.

Aciz avatar Nov 01 '21 17:11 Aciz

mod_url www.etlegacy.com mod_version v2.78.0 mod_wolfadmin 1.2.1 server: https://teammuppet.com/

randomek avatar Nov 01 '21 20:11 randomek

I can confirm that I can't vote, always when dynamite kills me.

randomek avatar Jan 10 '22 20:01 randomek

It's probably here:

https://github.com/etlegacy/etlegacy/blob/master/src/game/g_combat.c

trap_SendServerCommand(self - g_entities, va("complaint %i", attacker->s.number));
								if (meansOfDeath != MOD_DYNAMITE || !(inflictor->etpro_misc_1 & 1))   // do not allow complain when tked by dynamite on objective

So maybe change like this would fix it:

--- g_combat.c	2022-02-24 14:18:42.000000000 +0100
+++ g_combat2.c	2022-03-31 23:24:24.473974065 +0200
@@ -527,12 +527,15 @@
 							    !((meansOfDeath == MOD_ARTY || meansOfDeath == MOD_AIRSTRIKE) && (g_disableComplaints.integer & TKFL_AIRSTRIKE)) &&
 							    !((meansOfDeath == MOD_MORTAR || meansOfDeath == MOD_MORTAR2) && (g_disableComplaints.integer & TKFL_MORTAR)))
 							{
-								trap_SendServerCommand(self - g_entities, va("complaint %i", attacker->s.number));
 								if (meansOfDeath != MOD_DYNAMITE || !(inflictor->etpro_misc_1 & 1))   // do not allow complain when tked by dynamite on objective
 								{
 									self->client->pers.complaintClient  = attacker->s.clientNum;
 									self->client->pers.complaintEndTime = level.time + 20500;
 								}
+								else
+								{
+									trap_SendServerCommand(self - g_entities, va("complaint %i", attacker->s.number));
+								}
 							}
 						}
 					}

randomek avatar Mar 31 '22 21:03 randomek

Hm. I played today with 2.80.2 and it works correctly. When I was killed by team dyna - message with question to vote didn't displayed.

randomek avatar May 10 '22 20:05 randomek

I've had this happen on 2.80.1, and .1 -> .2 didn't touch any code related to this, so I'm pretty sure the issue is still there. Afaik this issue comes from etmain (and is infact present in most mods), due to the way the whole vote/complaint thing is handled in the same location. Ideally we should seperate these and make a dedicated element for each thing using this HUD element (votes, fireteam prompts and complaint popups).

Aciz avatar May 10 '22 20:05 Aciz