higps / robogithub

Assymetric gamemode where one team are robots and the other are humans
http://bmod.tf
5 stars 7 forks source link

Robot Change Messages sometimes displayed to Human team #16

Closed higps closed 2 years ago

higps commented 2 years ago

This may have to do with which team they are on prior to being put on a robot team. Appears to happen mostly on players who were there during the initiation.

eisbaer66 commented 2 years ago

is this about the "You can only change class in spawn" message?
(not "Unable to change class. Use !cr to change robot or !stuck if you are stuck" or "Type !cr or change class in spawn to change robot!")
i think !IsAnyRobot(client) is wrong here
https://github.com/higps/robogithub/blob/4190baf3627a14bbbf9c1e5cf282e53a1eb90f1a/berobot_handler.sp#L1854 maybe a IsAnyRobotWhenDead(...) (without the !) is needed here (similar to IsRobotWhenDead(...))?

higps commented 2 years ago

is this about the "You can only change class in spawn" message? (not "Unable to change class. Use !cr to change robot or !stuck if you are stuck" or "Type !cr or change class in spawn to change robot!") i think !IsAnyRobot(client) is wrong here

https://github.com/higps/robogithub/blob/4190baf3627a14bbbf9c1e5cf282e53a1eb90f1a/berobot_handler.sp#L1854

maybe a IsAnyRobotWhenDead(...) (without the !) is needed here (similar to IsRobotWhenDead(...))?

No, this is the notification that shows whenever someone changes robot, as sometimes it's shown to the human team.

eisbaer66 commented 2 years ago

ah mb is it this check then? https://github.com/higps/robogithub/blob/4190baf3627a14bbbf9c1e5cf282e53a1eb90f1a/berobot_factory.sp#L457 should be GetRobot(otherRobotClientIndex, otherRobotName, NAMELENGTH) with otherRobotClientIndex to check the robot of the client who gets the notification, right?
(instead of checking the robot of the client who is switching/trashing robot)