Zandronum Chat on our Discord Server Get the latest version: 3.1
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0003666Zandronum[All Projects] Bugpublic2019-06-22 08:472022-09-18 17:16
Reporterauratoostronk 
Assigned To 
PrioritynormalSeveritycrashReproducibilityalways
StatusclosedResolutionno change required 
PlatformPCOSWindows 10OS Version10.0.17763
Product Version3.0 
Target VersionFixed in Version 
Summary0003666: Sine and Cosine functions in decorate not working on servers?
DescriptionI'm using the following decorate code to fire a shotgun in a consistant circular pattern every time it is fired. It works fine in offline skirmish but I've tested it on TSPG's hosting service and on my own server from my own device and when it fires the game freezes until I have to close it. It does not affect the server but only the client i.e. other players on the server are not affected.
Steps To ReproduceThis is my code for the shotgun:

Fire:
        TNT1 A 0 ACS_NamedExecuteAlways("PauseEnergyRegen", 0)
        TNT1 A 0 A_TakeInventory("StealthTic", 999)
        TNT1 A 0 A_FireCustomMissile("PurpleFlashShoot", 0, false)
        TNT1 A 0 A_PlayWeaponSound("ParticleSplitter/Fire")
        TNT1 A 0 A_Recoil(6)
        TNT1 A 0 Bright A_FireCustomMissile("SGPellet", frandom(-3.0, 3.0), true, 0.0, -1.0, 0, frandom(-3.0, 3.0))
        TNT1 A 0 A_SetArg(0, 0)
        TNT1 A 0 A_SetArg(1, 0)
    Fire1:
        TNT1 A 0 A_FireCustomMissile("SGPellet", 1.8*cos(args[0]), false, 0.0, -1.0, 0, 1.8*sin(args[0]))
        TNT1 A 0 A_FireCustomMissile("SGPellet", 3.0*cos(args[0]), false, 0.0, -1.0, 0, 3.0*sin(args[0]))
        TNT1 A 0 A_SetArg(0, args[0] + 30)
        TNT1 A 0 A_JumpIf(args[0] >= 360, "Fire2")
        Goto Fire1
    Fire2:
        TNT1 A 0 A_FireCustomMissile("SGPellet", 0.8*cos(args[1]), false, 0.0, -1.0, 0, 0.8*sin(args[1]))
        TNT1 A 0 A_FireCustomMissile("SGPellet", 4.0*cos(args[1]), false, 0.0, -1.0, 0, 4.0*sin(args[1]))
        TNT1 A 0 A_SetArg(1, args[1] + 60)
        TNT1 A 0 A_JumpIf(args[1] >= 360, "FireFinish")
        Goto Fire2
    FireFinish:
        PSGF ABCBA 1
        Goto Pump
Additional InformationI've recorded the footage of both the offline skirmish with bots and myself on my server. The files are too big to put here so I posted links to the videos on my google drive.

'https://drive.google.com/open?id=17U5qGP6lEWvHytlmjKlXfdaS1QKT4afE [^]'

'https://drive.google.com/open?id=12WMOkagcGkxR-185MwugSlDKc6Ib-X_0 [^]'
Attached Filestxt file icon FIRE STATES.txt [^] (1,022 bytes) 2022-06-11 09:01 [Show Content]
? file icon testingabug.pk3 [^] (514 bytes) 2022-06-11 09:22
txt file icon New Text Document.txt [^] (1,017 bytes) 2022-09-16 08:28 [Show Content]

- Relationships

-  Notes
User avatar (0022265)
auratoostronk (reporter)
2022-06-11 09:01
edited on: 2022-06-11 09:02

I decided to take a tackle at this again, since I thought it might be an error on my part. It does not appear to be so. I uploaded my new code in a text document. The error occors in state Fire1, everything else is tested. Something about the sine/cosine functions don't want to work server side. I'll try to do more testing.

User avatar (0022266)
auratoostronk (reporter)
2022-06-11 09:22

Interestingly the crash doesn't happen with hitscans it seems. I uploaded a working pk3 that does something similar but with A_FireBullets
User avatar (0022399)
auratoostronk (reporter)
2022-09-16 08:28
edited on: 2022-09-16 08:30

I found a fix, and I think this issue is resolved. Swapping the "Jump If" statement to point back to the weapon state its in and changing the Goto state to the next weapon state fixes the issue. I posted it as "New Text Document" (sorry forgot the file name is visible here).

User avatar (0022401)
Kaminsky (developer)
2022-09-18 17:16

I'm closing this ticket now as the original issue didn't have anything to do with the sine or cosine DECORATE functions, nor did it affect the server. Rather, it was caused by an infinite loop in the "Fire1" state on the client's end (they cannot execute and will ignore jump functions on their end). Aura has found a fix to his problem since then.

Issue Community Support
This issue is already marked as resolved.
If you feel that is not the case, please reopen it and explain why.
Supporters: No one explicitly supports this issue yet.
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2019-06-22 08:47 auratoostronk New Issue
2022-06-11 09:01 auratoostronk Note Added: 0022265
2022-06-11 09:01 auratoostronk File Added: FIRE STATES.txt
2022-06-11 09:02 auratoostronk Note Edited: 0022265 View Revisions
2022-06-11 09:22 auratoostronk Note Added: 0022266
2022-06-11 09:22 auratoostronk File Added: testingabug.pk3
2022-09-16 08:28 auratoostronk Note Added: 0022399
2022-09-16 08:28 auratoostronk File Added: New Text Document.txt
2022-09-16 08:30 auratoostronk Note Edited: 0022399 View Revisions
2022-09-18 17:16 Kaminsky Note Added: 0022401
2022-09-18 17:16 Kaminsky Status new => closed
2022-09-18 17:16 Kaminsky Resolution open => no change required






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2024 MantisBT Team
Powered by Mantis Bugtracker