IRC logs of Libera.Chat #BZFlag for Monday, 2021-06-28

Agatha"plus you don't call non-API functions from a plugin" <- speaking of . . . I want to call non-API functions from a plugin.00:05
AgathaSome entry points I'm looking at are `getDirectMessageBuffer()`,` nboPackUByte(...)` (etc.), `directMessage(...)`, and the `ShotManager` object.00:05
AgathaThis actually works—and works correctly—under Linux, but fails to link under Windows.00:05
blast007Agatha: if I set _shotRange from the command line, it does affect the laser length.00:07
blast007yeah, Windows is doing it right00:08
blast007on Linux we need to fix it00:08
blast007GCC has a 'visibility' feature we need to make use of so that we don't export private symbols00:08
blast007so if you need some other plugin-accessible feature, you need to extend the API00:10
blast007not sure what you're trying to do though00:10
Agathablast007, "if I set _shotRange from the command line, it does affect the laser length" <- Yes; in the latest version of the plugin, I compensate for this, assuming "/reset _reloadTime" has been called.00:19
Agatha"yeah, Windows is doing it right[; ]on Linux we need to fix it" <- It makes perfect sense to me that the private symbols would not be easily visible. However, the current API has gaps and there are various deficiencies in the way certain flags are implemented that encourage . . . hacky workarounds. And therefore, this may not be the "right thing", but it's also the only way to make progress short of altering the API myself.00:19
AgathaAnd yes, I would be willing to alter some aspects of the API—but this is a bigger deal, and more error-prone, than I'd like. I would rather not do that if there's a way to just see the symbols. It should be theoretically possible.00:19
Agatha"not sure what you're trying to do" <- I have two things I'm trying to do.00:19
AgathaThe first is to tell the client to delete a shot they have just fired. See this block in the plugin for the context, explanation, and code: https://github.com/agatha2/Whacky-Weapons/blob/916a6a0a4244a8ef8cdd76e37837ba9429e2f5db/whacky_weapons.cpp#L85500:19
AgathaThe second is because I think I have discovered a way to get SWs of varying sizes to work, but it requires adjusting stuff in the `ShotManager`.00:19
Agatha(The first thing is the most immediately important.)00:22
blast007I'm unclear what issue you're seeing with setting _shotRange...00:28
Agathablast007 The issue is: (1) put "-set _shotSpeed 140" in a server's ".conf" file, (2) start the server and join as a client, (3) observe that various shot parameters are unexpected until (4) "/reset _reloadtime" is called by an admin on the server.00:31
blast007which shot parameters?00:32
blast007are there a set of variable values I can set to see this?00:32
SpringTanki think i know what agatha is talking about, though it's a vague memory from a long time ago so I might be wrong. agatha, try the same thing on linux and see if it works or not. could be a weird thing with bzfs running on windows.00:43
AgathaI noticed it on the laser distance calculation above; the shot range would get clipped, as is described in the docs. The only variable being set in the ".conf" I believe was "-set _shotSpeed 140". However, since I had had this issue, I updated the laser distance calculation as blast007 taught me. Since doing that, I'm having trouble reproducing the issue (meaning most-likely it was related to the error in the laser distance calculation, and therefore that 00:47
Agathathere is no problem).00:47
SpringTankhmmmmmmmmmmm, i had something similar with sets in my config before. try putting some of the sets in the map file itself. 00:50
SpringTankbzflag doesn't seem to always pars some file properly especially if you used wordpad or notepad because those two, especially wordpad, like to use their own special ascii codes for stuff like new lines, etc.00:52
SpringTankwell, not special actually. they are standard ascii codes it just uses more of them00:52
SpringTankfor formatting00:52
blast007you shouldn't be using a rich text editor for plain text files00:53
AgathaI use Notepad++, like a normal human being :300:53
the_mapI use a butterfly00:53
SpringTanknano00:53
Agatha@the_map I tried butterflies, but I couldn't get a very good WPM00:54
BZNotifyAgatha: Error: "the_map" is not a valid command.00:54
blast007heh00:55
SpringTanklol00:55
allejocan teleporters only have names without spaces?03:04
allejoread through the man page, seems like all names use underscores instead of spaces03:08
*** I_Died_Once <I_Died_Once!~I_Died_On@c-73-184-170-223.hsd1.ga.comcast.net> has quit IRC (Ping timeout: 272 seconds)03:09
blast007might be a limit of links?03:10
blast007hmm, no, I guess that could *technically* support spaces03:10
allejoyea, when i have a map with teleporters with spaces in their name, bzfs doesn't link them correctly03:11
allejoso wonder if that's a limitation or if there's a way to escape that03:11
blast007I don't see any special parsing for quotes in CustomLink.cxx, so it probably will not work with spaces03:12
allejoI don't see any special parsing for `matref` and `material` names either. i wonder if that supports spaces03:15
allejolooks like materials supports spaces just fine03:19
allejoor... wait03:19
allejonope, doesn't support spaces03:20
allejoI definited a material with "Grass Texture" as the name and used a matref of "Grass Blue" and it worked03:20
allejoso it stops caring at the first space03:20
blast007yeah, that was my guess how this works03:20
blast007std::istream must read based on space delimited text03:21
allejomakes sense03:21
allejomkay, i'll auto replace spaces with underscores in my code03:22
the_mapI assume you know what you're doing, but I'm concerned you're putting spaces in names in the first place03:24
allejodamn. "the map" brings up a good point. wait. the_map*03:25
the_mapI used to be "the map" years ago, but that space bugged me. I think joining IRC was what finally made me change to an underscore03:26
allejolol03:29
the_mapI actually like the-map better as a nick, but I don't like dashes as valid token characters so I don't use that03:34
*** Sgeo <Sgeo!~Sgeo@user/sgeo> has quit IRC (Read error: Connection reset by peer)07:41
*** I_Died_Once <I_Died_Once!~I_Died_On@c-73-184-170-223.hsd1.ga.comcast.net> has joined #bzflag09:23
blast007the linker issue with 64-bit Windows build was an easy fix.  msvcrt was on some ignore list.11:12
blast007there's still the 400+ warnings that need fixing though11:12
*** Sgeo <Sgeo!~Sgeo@user/sgeo> has joined #bzflag13:41
*** r0b0 <r0b0!~r0b0@96.44.188.218> has joined #bzflag15:23
*** r0b0 <r0b0!~r0b0@96.44.188.218> has quit IRC (Ping timeout: 246 seconds)19:43
*** r0b0 <r0b0!~r0b0@23.226.129.162> has joined #bzflag19:47
*** Gollum <Gollum!~Gollum@131.93.56.40> has joined #bzflag19:52
AgathaMy plugin seems to be crashing when run on SpringTank's server. I'm trying to capture a debug trace. Anyone to join my test server? (And tell me why/if you get kicked?)20:24
Gollumwhich server is it ag20:29
GollumHey Blast20:34
GollumI have a question about observers20:34
SpringTankstupidnet.duckdns.org:515520:35
AgathaErrr I'm running my tests on laserlady.freemyip.com:5154, but yes, SpringTank's test server is running it too (but might not be running right now)20:38
blast007Gollum: k20:51
Gollumis there a way...20:51
Gollumnow hear me out20:51
Gollumis there a way to when u are obs. To see the other persons UI.20:51
Golluminstead of just ur own but watching them20:51
blast007you mean a player UI?20:52
GollumFor example. Someone new joins Ducati and wants to get into it. And u explain how radar should look. Instead u can just say observe me20:52
Gollumthe players display settings20:52
Gollumthe HUD20:52
Gollumradar, etc.20:52
blast007if you're asking if we can build a screen-sharing feature into BZFlag, then no, that won't happen20:53
blast007is there something wrong with existing screen sharing applications?20:53
GollumThis is harder to explain than I thought20:53
GollumSo you have your bz settings, I have mine20:53
Gollumnyour radar is black in background mine is see thru20:54
Gollumbut if I go obs, and swap to you, I see bz as you have it set on ur pc20:54
blast007no20:54
Gollumnot possible?20:54
blast007oh it's possible, but it won't happen :)20:54
Gollumdarn haha20:54
GollumI only thought of it cause someone asked me earlier how to set radar, and I was like "I wish u could see"20:55
blast007that seems like a VEEEERY limited usage for such a large amount of work20:55
blast007just take a screenshot20:55
blast007or use chat20:56
SpringTankor copy your client config20:57
SpringTankpost it on pastbin or smth20:58
blast007I'd like if people wouldn't do that since sometimes people forget to remove their password :P21:01
*** Gollum <Gollum!~Gollum@131.93.56.40> has quit IRC (Quit: Client closed)21:11
AgathaAny potential problems with calling `bz_kickUser(...)` inside a `bz_ePlayerJoinEvent(...)`? I try to send a message and then kick, but people aren't receiving the message always.21:15
AgathaEhh I should probably just `bz_kickUser(...)` only.21:17
blast007can you just reject the user instead of kicking them?21:20
blast007https://www.bzflag.org/documentation/developer/bzfs_api/events/bz_eallowplayer/21:21
Optic_DelusionYou gotta use the { correct brackets in your kick message } 21:22
blast007Optic_Delusion: what do you mean?21:23
*** Gollum <Gollum!~Gollum@131.93.56.40> has joined #bzflag21:23
Optic_Delusionthe message is required to be in {} brackets21:24
Gollumoptiic u still around this joint?21:24
Optic_Delusionnever left, but i was somewhat inactive last year.... back now21:24
*** Sgeo_ <Sgeo_!~Sgeo@ool-18b9875e.dyn.optonline.net> has joined #bzflag21:24
blast007Optic_Delusion: what does that mean?21:25
GollumI know u dont leave, I just do haha21:25
blast007the kick message needs to be in quotes, not brackets21:25
Optic_Delusionah, my bad21:26
blast007it's probably just a bad idea to kick a player in the join event21:26
Gollum[kick "Gollum"]21:26
SpringTankI think she wants to send them a server message first?21:26
Optic_Delusiononly need quotes if there's a space in the message?21:26
SpringTankI would just send the server message, small delay, then kick/reject21:26
blast007what are we kicking the player for again?21:26
SpringTankolder clients21:27
blast007why?21:27
SpringTankagatha is relying on a bug fix for one of her plugins I think21:27
Optic_Delusion i do it by player slot. /kick #1 "some unknown reason" 21:27
blast007the "fix" that was linked to me was in the *server*, not the client21:27
SpringTankright, that's what I thought...21:27
blast007so just stop kicking players for no reason and that'll fix that crash :P21:28
SpringTankbut that function is still in the plugin21:28
SpringTank^21:28
*** Sgeo <Sgeo!~Sgeo@user/sgeo> has quit IRC (Ping timeout: 272 seconds)21:28
GollumRN with the smaller base of players, removing ppl for older versions is going to just refrain the map from getting play21:28
Agathablast is correct that the fix mostly affects the server, but I am debugging this feature just in case it becomes useful later. I will disable it later for this plugin.21:28
GollumI know I went off of an old version for years21:29
blast007nah, just remove the feature21:29
Gollumand if I was rando kicked, I wouldnt think "my client"21:29
blast007it's useless21:29
AgathaThe crash is apparently a different issue. And if later versions change the client, it won't necessarily be useless, yes?21:30
blast007we try our best to specifically *avoid* any changes that affect the client, even if it's fixing a bug21:30
blast007we try to keep client behavior the same across the same major version21:31
Optic_Delusion  these  {} brackets work for the message too... 21:31
Optic_Delusionjust tested it21:31
SpringTankthat sounds pretty standard21:31
blast007Optic_Delusion: give more context21:31
Agathablast007, understandable. But still.21:31
blast007but nothing21:32
blast007it's not your plugin's job to get people to upgrade21:32
Optic_Delusion did. /kick #2 {some unknown reason}.   and they reported seeing the reson21:32
blast007we likely won't have any further 2.4 releases unless some major probje is found21:32
blast007Optic_Delusion: we're talking about the API, not the kick command21:33
Optic_Delusioni've always used brakets there, not quotes21:33
blast007the kick command doesn't need brackets or quotes, afaik, except for the name21:33
Optic_Delusionoh, would you like to shoot me now, or can it wait until later?21:33
blast007so this should be fine as well: /kick "some user" bla blah blah blah21:33
allejoyou only need quotes for callsigns with spaces21:34
allejofor the /kick command21:34
Gollumso for Gollum you wouldnt need quotes?21:35
allejocorrect21:35
AgathaIs there a way for the plugin to check the version of the server it is being loaded upon?21:36
Gollumim not quote worthy :(21:36
SpringTankagatha, does that matter? have the minimum server version in the readme ;)21:37
SpringTankit should be possible though.21:37
AgathaI like computers to do checks for me, because I'm daft enough to forget them if left to my own devices.21:38
allejohttps://www.bzflag.org/documentation/developer/bzfs_api/functions/bz_getserverversion/21:38
allejobut i think that's proto only21:38
blast007that's not the actual version number21:38
allejonot a minor version21:38
blast007why do you need that?21:39
*** BulletCatcher <BulletCatcher!~bc@user/bulletcatcher> has quit IRC (Remote host closed the connection)21:43
AgathaYeah need the minor version. I couldn't find if it was exposed anywhere. I disagree that a client check isn't useful for future-proofing, and I give up on the server check for now (which doesn't matter super a lot; it just would have been nice).21:47
*** BulletCatcher <BulletCatcher!~bc@user/bulletcatcher> has joined #bzflag21:51
*** r0b0 <r0b0!~r0b0@23.226.129.162> has quit IRC (Quit: Client closed)22:16
*** Sgeo_ <Sgeo_!~Sgeo@ool-18b9875e.dyn.optonline.net> has quit IRC (Quit: Leaving)22:59
*** Sgeo <Sgeo!~Sgeo@user/sgeo> has joined #bzflag22:59
*** Gollum <Gollum!~Gollum@131.93.56.40> has quit IRC (Quit: Client closed)23:18
SpringTankWe have been playing on my server and so far using the custom sound function hasnt caused any crashes that i can tell. Granted, im only using the sounds that come with bzflag.23:35

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