ValveSoftware / halflife

Half-Life 1 engine based games
Other
3.62k stars 610 forks source link

[DMC] FriendlyFire 0 fails #1889

Open APGRoboCop opened 6 years ago

APGRoboCop commented 6 years ago

I've noticed when I used admin_friendlyfire 0 when playing DMC in Teamplay mode that the DMC bots are getting hurt by my gunfire. I don't know if this is a bug or not, but is anyone getting mp_friendlyfire 0 issues where the FF isn't really switched off in the servers?

BlackShadow commented 6 years ago

If im not wrong, bots are using different class than the actual players. It would be more appropriate to test it on real players.

BlackShadow commented 6 years ago

Okay, so i have tested it and here's the results.

When i set friendlyfire to 0 i wasn't able to hurt my teammates. But then i changed to 1 and i still wasn't able to hurt them. I tried to restart the server after typing the command but result was still same. So yeah FF is bugged but other way around.

SamVanheer commented 6 years ago

DMC friendly fire rules are not straightforward, first of all if teamplay is disabled then mp_friendlyfire makes no difference (deathmatch rules), if teamplay is enabled then it depends: https://github.com/ValveSoftware/halflife/blob/5d761709a31ce1e71488f2668321de05f791b405/dmc/dlls/quake_player.cpp#L132

I recommend looking at the source code to figure out what rules there are exactly. Remember that gamerules play a big part, those are created on map start (InstallGameRules) so make sure the right rules are in play.