IRC logs of Libera.Chat #BZFlag for Monday, 2022-11-21

*** Zehra <Zehra!~Yukari@user/yukari> has joined #bzflag02:10
ZehraI've found something a bit interesting in terms of doing custom shots on behalf of players...02:11
ZehraLikely this is a bug, here is what happens.02:12
ZehraBased on shockwaveDeath plug-in, so same shockwave, but it is given the shot data assigning it killerID as the the one to be attributed any kills made by the shockwave....02:14
Zehrauint32_t shotGUID = bz_fireServerShot("SW", dieData->state.pos, vector, dieData->killerTeam);02:14
Zehrabz_setShotMetaData(shotGUID, "killer", dieData->killerID);02:15
Zehra(I'm wrapping this as a utility function too, so this is the basic thing.)02:15
ZehraAbove it, I do have a conditional to check for any deaths caused by a server shot and see if it matches the data...02:16
ZehraIt's properly reassigned and the scoring works alright and everything...02:17
ZehraBut when you have this killer -> player -> player's shockwave attributed to killer -> player killed by shockwave -> resulting shockwave from player killed by shockwave...02:18
ZehraWe wind up where despite the killer being properly reassigned/attributed, killerTeam doesn't change, so if a purple tank kills red tank, red tank kills a green tank, green tank's shockwave is not purple...02:21
ZehraplayerShotFromServer(const char* shotType, float origin[3], float tilt, float rotation, int player, bz_eTeamType shotTeam = eRogueTeam)02:22
Zehra^Utility function used: I get rogue shockwaves, so it's known while even if the killer is reassigned, the killer team isn't.02:22
Zehraa.k.a. NoTeam is received in this case, since it's from the server. :p02:28
blast007are you using the 'killer' metadata value to look up their team?02:36
ZehraplayerShotFromServer("SW", dieData->state.pos, 0, 0, dieData->killerID, dieData->killerTeam);02:38
blast007if I'm thinking correctly, in the event that the dieData-killerID is the server player, you should be checking if the "killer" metadata value exists, and if so, look up and use the team of that player instead of the team of the death event02:38
blast007dieData->killerID*02:38
blast007and probably better if I said "in case the" instead of "in the event that the", since we're talking about events :)02:39
ZehraThat's one of the checks above the function, so if it's the server, the killer is reassigned properly.02:39
blast007so what is the problem then?02:40
ZehraIt's more of, it makes a slightly less elegant solution if I need to use bz_getPlayerTeam() in playerShotFromServer function for the team.02:42
blast007well otherwise you're going to be getting the server player's team02:43
blast007also, you should be using the BZ_SERVERPLAYER define instead of hard coding 253 (re: your code on Discord)02:44
blast007just in case we ever change it in the future02:44
Zehraah, yes, I kind of do need to update it.02:45
ZehraCould it be possibly be made automatically, such as in the case of the killerID being reassigned, the killerTeam value is automatically made to the slot assigned to it?02:46
ZehraUse case: Solves a likely rarely seen bug, also as far as I can tell, no plug-ins use or would use killerteam to check if it was from the server.02:47
ZehraSince it could be gotten from the finalized event.02:47
Zehraplayerdeathfinalized*02:48
blast007or just get the player's team02:50
Zehrawill do02:51
*** Zehra <Zehra!~Yukari@user/yukari> has quit IRC (Quit: Quit.)03:35
BZNotify2.4 @ bzflag: blast007 pushed 1 commit (https://github.com/BZFlag-Dev/bzflag/compare/bf8070227ae1...adb7164f7e66):03:54
BZNotify2.4 @ bzflag: blast007 adb716: Bump version to 2.4.27 (https://github.com/BZFlag-Dev/bzflag/commit/adb7164f7e66ce9980f8944835aee962dc6074f5)03:54
*** I_Died_Once <I_Died_Once!~I_Died_On@c-73-184-170-223.hsd1.ga.comcast.net> has quit IRC (Ping timeout: 268 seconds)04:33
*** FastLizard4 is back07:53
*** Sgeo <Sgeo!~Sgeo@user/sgeo> has quit IRC (Read error: Connection reset by peer)08:15
*** FastLizard4 is now away: AWAY from keyboard08:23
*** FastLizard4 is now away: GONE - Screen Detached and Disconnected from IRC (I'm probably asleep, at work, or doing something in real life)08:43
*** nitroxis <nitroxis!n@nxs.re> has quit IRC (Read error: Software caused connection abort)09:34
*** nitroxis <nitroxis!n@nxs.re> has joined #bzflag09:39
*** I_Died_Once <I_Died_Once!~I_Died_On@c-73-184-170-223.hsd1.ga.comcast.net> has joined #bzflag10:40
tuponeupdated gentoo with 2.4.2613:20
*** Sgeo <Sgeo!~Sgeo@user/sgeo> has joined #bzflag14:31
*** FastLizard4 is back16:56
*** FastLizard4 is now away: AWAY from keyboard17:03
blast007tupone: thanks!17:11
allejoblast007: ya what email did you use? snapcraft is configured to build automatically to reflect the github repo. but releases need to be promoted manually to "stable" status, which you do through the website17:20
blast007I suppose I should test the new snap before I'd promote it to the new stable, so I'll see about that tonight :)17:30
allejoi would have thought you'd test it before merging into the snap repo :p17:32
blast007with flatpak the PR process generates a build you can install and test17:33
blast007for snaps do you just manually trigger some build from the repo contents?17:33
allejofor snaps, you can build the snap locally and test it on your computer17:34
allejoi'm not sure if there's similar functionality to flatpak regarding test builds. at least nothing that's been configured17:35
*** disco <disco!~disco@81.187.95.100> has quit IRC (Ping timeout: 268 seconds)19:34
*** disco <disco!~disco@81.187.95.100> has joined #bzflag19:34
*** BZNotify <BZNotify!BZNotify@user/bznotify> has joined #bzflag23:22

Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!