-
Notifications
You must be signed in to change notification settings - Fork 85
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] flagid in bz_ePlayerDieEvent may be incorrect #337
Comments
The following has been tested and reproduced with The following plug-in was for bug reproduction and documentation: // deathFlagID.cpp
#include "bzfsAPI.h"
class deathFlagID : public bz_Plugin
{
public:
const char* Name(){return "deathFlagID";}
void Init (const char* commandLine) {
Register(bz_ePlayerDieEvent);
}
void Event(bz_EventData *eventData ){
switch (eventData->eventType) {
case bz_ePlayerDieEvent: {
bz_PlayerDieEventData_V2* deathData = (bz_PlayerDieEventData_V2*)eventData;
bz_sendTextMessagef(BZ_SERVER,BZ_ALLUSERS, "The flagID value of flagHeldWhenKilled is: %d", deathData->flagHeldWhenKilled);
}break;
default:{
}break;
}
}
void Cleanup (void) {
Flush();
}
};
BZ_PLUGIN(deathFlagID) As for reproduction of the bug, the following steps will reproduce it reliably under the following configuration:
The following occurred in testing and should be able to be reproduced: This is despite it being held by another player and the player having been spawned and not given any flag on the other steps. The value of |
I've read through this report numerous times, and will attempt to interpret/summarize it. The API event How did I do? |
@macsforme It's perfectly summarized. |
It is known that a bug occurs, as within one plug-in, the conditions required for specific flags are met, even if the players are not retaining the flags themselves.
According to one report: It seems spawning and not grabbing a flag, will cause the flagid to be incorrect.
In BZFS, the following section of code exists:
In theory it is possible for the flagid to be incorrect in the case of when another player would hold the flag, as the flag in question would be held, even if not by the same player. (The flagid is not reset at the end of the death event either.)
The text was updated successfully, but these errors were encountered: