*** Zehra <Zehra!~Yukari@user/yukari> has joined #bzflag | 02:10 | |
Zehra | I've found something a bit interesting in terms of doing custom shots on behalf of players... | 02:11 |
---|---|---|
Zehra | Likely this is a bug, here is what happens. | 02:12 |
Zehra | Based 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 |
Zehra | uint32_t shotGUID = bz_fireServerShot("SW", dieData->state.pos, vector, dieData->killerTeam); | 02:14 |
Zehra | bz_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 |
Zehra | Above 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 |
Zehra | It's properly reassigned and the scoring works alright and everything... | 02:17 |
Zehra | But 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 |
Zehra | We 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 |
Zehra | playerShotFromServer(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 |
Zehra | a.k.a. NoTeam is received in this case, since it's from the server. :p | 02:28 |
blast007 | are you using the 'killer' metadata value to look up their team? | 02:36 |
Zehra | playerShotFromServer("SW", dieData->state.pos, 0, 0, dieData->killerID, dieData->killerTeam); | 02:38 |
blast007 | if 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 event | 02:38 |
blast007 | dieData->killerID* | 02:38 |
blast007 | and probably better if I said "in case the" instead of "in the event that the", since we're talking about events :) | 02:39 |
Zehra | That's one of the checks above the function, so if it's the server, the killer is reassigned properly. | 02:39 |
blast007 | so what is the problem then? | 02:40 |
Zehra | It'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 |
blast007 | well otherwise you're going to be getting the server player's team | 02:43 |
blast007 | also, you should be using the BZ_SERVERPLAYER define instead of hard coding 253 (re: your code on Discord) | 02:44 |
blast007 | just in case we ever change it in the future | 02:44 |
Zehra | ah, yes, I kind of do need to update it. | 02:45 |
Zehra | Could 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 |
Zehra | Use 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 |
Zehra | Since it could be gotten from the finalized event. | 02:47 |
Zehra | playerdeathfinalized* | 02:48 |
blast007 | or just get the player's team | 02:50 |
Zehra | will do | 02:51 |
*** Zehra <Zehra!~Yukari@user/yukari> has quit IRC (Quit: Quit.) | 03:35 | |
BZNotify | 2.4 @ bzflag: blast007 pushed 1 commit (https://github.com/BZFlag-Dev/bzflag/compare/bf8070227ae1...adb7164f7e66): | 03:54 |
BZNotify | 2.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 back | 07:53 | |
*** Sgeo <Sgeo!~Sgeo@user/sgeo> has quit IRC (Read error: Connection reset by peer) | 08:15 | |
*** FastLizard4 is now away: AWAY from keyboard | 08: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 #bzflag | 09:39 | |
*** I_Died_Once <I_Died_Once!~I_Died_On@c-73-184-170-223.hsd1.ga.comcast.net> has joined #bzflag | 10:40 | |
tupone | updated gentoo with 2.4.26 | 13:20 |
*** Sgeo <Sgeo!~Sgeo@user/sgeo> has joined #bzflag | 14:31 | |
*** FastLizard4 is back | 16:56 | |
*** FastLizard4 is now away: AWAY from keyboard | 17:03 | |
blast007 | tupone: thanks! | 17:11 |
allejo | blast007: 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 website | 17:20 |
blast007 | I 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 |
allejo | i would have thought you'd test it before merging into the snap repo :p | 17:32 |
blast007 | with flatpak the PR process generates a build you can install and test | 17:33 |
blast007 | for snaps do you just manually trigger some build from the repo contents? | 17:33 |
allejo | for snaps, you can build the snap locally and test it on your computer | 17:34 |
allejo | i'm not sure if there's similar functionality to flatpak regarding test builds. at least nothing that's been configured | 17: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 #bzflag | 19:34 | |
*** BZNotify <BZNotify!BZNotify@user/bznotify> has joined #bzflag | 23:22 |
Generated by irclog2html.py 2.17.3 by Marius Gedminas - find it at https://mg.pov.lt/irclog2html/!