MantisBT - Zandronum
View Issue Details
0000763Zandronum[All Projects] Bugpublic2012-04-12 01:362018-09-30 19:51
unknownna 
Torr Samaho 
urgentblockalways
closedfixed 
1.0-beta 
1.0 
0000763: AOW2 Bazooka disappears online
Attached screenshot. The bazooka disappears after pressing +altattack.
1. skulltag.exe -file aow_bazooka_01.wad -host
2. Connect a client to the server and join the game.
3. Aim at the zombieman and press +altattack.
No tags attached.
? aow_bazooka_01.wad (2,220) 2012-04-12 01:36
/tracker/file_download.php?file_id=530&type=bug
png Screenshot_Doom_20120412_033524.png (34,477) 2012-04-12 01:37
/tracker/file_download.php?file_id=531&type=bug
png

? aow_bazooka_02.wad (2,409) 2012-04-12 09:15
/tracker/file_download.php?file_id=536&type=bug
png Screenshot_Doom_20120416_020650.png (38,330) 2012-04-16 00:24
/tracker/file_download.php?file_id=549&type=bug
png
Issue History
2012-04-12 01:36unknownnaNew Issue
2012-04-12 01:36unknownnaFile Added: aow_bazooka_01.wad
2012-04-12 01:37unknownnaFile Added: Screenshot_Doom_20120412_033524.png
2012-04-12 01:38unknownnaStatusnew => confirmed
2012-04-12 01:44TIHanAssigned To => TIHan
2012-04-12 01:44TIHanStatusconfirmed => assigned
2012-04-12 01:58unknownnaNote Added: 0003217
2012-04-12 02:21TIHanNote Added: 0003218
2012-04-12 02:21TIHanStatusassigned => feedback
2012-04-12 09:15unknownnaNote Added: 0003221
2012-04-12 09:15unknownnaStatusfeedback => assigned
2012-04-12 09:15unknownnaFile Added: aow_bazooka_02.wad
2012-04-12 23:30TIHanNote Added: 0003222
2012-04-12 23:34TIHanNote Edited: 0003222bug_revision_view_page.php?bugnote_id=3222#r1713
2012-04-12 23:43TIHanNote Edited: 0003218bug_revision_view_page.php?bugnote_id=3218#r1715
2012-04-13 06:24TIHanAssigned ToTIHan => Torr Samaho
2012-04-14 21:41unknownnaPriorityhigh => urgent
2012-04-14 21:45unknownnaNote Added: 0003256
2012-04-14 22:32unknownnaNote Added: 0003260
2012-04-14 23:50TIHanNote Added: 0003261
2012-04-14 23:54unknownnaNote Added: 0003262
2012-04-15 00:16TIHanNote Added: 0003263
2012-04-15 00:51unknownnaNote Added: 0003264
2012-04-15 01:18TIHanNote Added: 0003265
2012-04-15 02:15Torr SamahoNote Added: 0003266
2012-04-15 02:24unknownnaNote Added: 0003268
2012-04-15 02:38Torr SamahoNote Added: 0003269
2012-04-15 02:39Torr SamahoNote Edited: 0003269
2012-04-15 02:42Torr SamahoNote Edited: 0003269
2012-04-15 02:43Torr SamahoNote Edited: 0003269bug_revision_view_page.php?bugnote_id=3269#r1733
2012-04-15 02:43Torr SamahoNote Revision Dropped: 3269: 0001730
2012-04-15 02:43Torr SamahoNote Revision Dropped: 3269: 0001731
2012-04-15 02:44Torr SamahoNote Revision Dropped: 3269: 0001732
2012-04-15 02:46TIHanNote Added: 0003271
2012-04-15 14:09Torr SamahoNote Added: 0003284
2012-04-15 15:08Torr SamahoNote Edited: 0003284bug_revision_view_page.php?bugnote_id=3284#r1741
2012-04-15 22:28Torr SamahoNote Added: 0003309
2012-04-16 00:24unknownnaNote Added: 0003313
2012-04-16 00:24unknownnaFile Added: Screenshot_Doom_20120416_020650.png
2012-04-16 00:59unknownnaNote Edited: 0003313bug_revision_view_page.php?bugnote_id=3313#r1760
2012-04-16 01:16Torr SamahoNote Added: 0003314
2012-06-09 13:22Torr SamahoCategoryGeneral => Bug
2013-07-16 16:49ArcoNote Added: 0006668
2013-07-16 20:24Torr SamahoStatusassigned => resolved
2013-07-16 20:24Torr SamahoFixed in Version => 1.0
2013-07-16 20:24Torr SamahoResolutionopen => fixed
2018-09-30 19:51Blzut3Statusresolved => closed

Notes
(0003217)
unknownna   
2012-04-12 01:58   
It seems that there are more weapons (e.g. medicgun, repairgun, utilitygun, etc.) that are affected by this bug.

AltFire:
        TNT1 A 0 A_JumpIfInventory("IsInSpawnRoom",1,"Ready")
        TNT1 A 0 A_JumpIfInventory("HasClass",1,1)
        goto Ready
        MISG AAAAAAAAAA 1 A_JumpIfTargetInLOS("AltFireGo")
        goto Ready


They use A_JumpIfTargetInLOS (not sure about the utilitygun).
(0003218)
TIHan   
2012-04-12 02:21   
(edited on: 2012-04-12 23:43)
Fixed.
'https://bitbucket.org/TIHan/tst/changeset/42dab18649cb [^]'

Edit: We may have to look at this more in depth.

(0003221)
unknownna   
2012-04-12 09:15   
I noticed the same issues in Zombie Horde.

CLAW E 0 A_JumpIf(tid==601, 32)
(0003222)
TIHan   
2012-04-12 23:30   
(edited on: 2012-04-12 23:34)
> CLAW E 0 A_JumpIf(tid==601, 32)

This one may be more complicated than the previous.

A_JumpIfTargetInLOS can be handled on the client because we have unlagged, this will work properly.

A_JumpIf is a different story as it takes an expression. The evaluation of this expression on the client vs the server has the possibility of being different.
Example: The expression could be a "random(1, 10) == 3". Random numbers are never in sync with client and server, therefore we may get unexpected results.

Edit: We may have to dig in to figure out how DoJump works. I believe Torr has done some work in there; he may know more about what's going on.

(0003256)
unknownna   
2012-04-14 21:45   
This is a showstopper bug.
(0003260)
unknownna   
2012-04-14 22:32   
I noticed the same thing in WhoDunIt. The chainsaw disappears when you select it.

ACTOR LChainsaw : Weapon
{
Obituary "%o was mowed over by %k's chainsaw."
Radius 20
Height 16
Inventory.pickupmessage "Found a Chainsaw."
Weapon.selectionorder 998
AttackSound "weapons/sawhit"
Weapon.preferredSkin "ChainsawSkin"
Weapon.AmmoType1 "Gasoline"
//Weapon.AmmoType2 "Gasoline"
//Weapon.AmmoGive1 1000
Weapon.AmmoUse1 1
//Weapon.AmmoUse2 1
+WEAPON.MELEEWEAPON
+INVENTORY.UNDROPPABLE

States
 {
 Spawn:
 CSAW A 0
 goto Death
 
WeaponDrop:
    TNT1 A 0
    TNT1 A 1 A_TakeInventory("IsDropping",1)
    TNT1 A 0 A_TakeInventory("Slot1Filled",1)
    TNT1 A 1 A_TakeInventory("SawOff",1)
    TNT1 A 0 A_TakeInventory("SawOn",1)
    TNT1 A 0 A_FireCustomMissile("DroppedChainsaw",0,0,0)
    TNT1 A 1 A_TakeInventory("LChainsaw",1)
    LOOP
    
 NoAmmoReady:
    TNT1 A 0 A_JumpIfInventory("IsDropping",1,"WeaponDrop")
     SAWF A 0 A_StopSoundEx("SoundSlot6")
    SAWF A 0 A_StopSoundEx("SoundSlot7")
    SAWF A 1 A_WeaponReady
    SAWF A 0 A_JumpIfInventory("Gasoline", 1, "Ready")
    loop
    
 OffReady:
    TNT1 A 0 A_JumpIfInventory("IsDropping", 1,"WeaponDrop")
     SAWF A 0 A_StopSoundEx("SoundSlot6")
    SAWF A 0 A_StopSoundEx("SoundSlot7")
    SAWF A 1 A_WeaponReady
    SAWF A 0 A_JumpIfInventory("SawOn", 1, "Ready")
    loop
    
 Ready:
 TNT1 A 0 A_JumpIfInventory("IsDropping", 1, "WeaponDrop")
 TNT1 A 15 A_PlaySound("weapons/sawzip")
 TNT1 A 15 A_PlayWeaponSound("weapons/sawpull")
 TNT1 A 5 A_Jump(96, 6)
 TNT1 A 15 A_PlaySound("weapons/sawzip")
 TNT1 A 15 A_PlayWeaponSound("weapons/sawpull")
 TNT1 A 5 A_Jump(96, 3)
 TNT1 A 15 A_PlaySound("weapons/sawzip")
 TNT1 A 15 A_PlayWeaponSound("weapons/sawpull")
 TNT1 A 5
 SAWD E 1
 SAWD D 1
 SAWD C 1
 SAWD B 1
 SAWD A 1 A_JumpIfNoAmmo ("NoAmmoReady")
 TNT1 A 0 A_JumpIfInventory("IsDropping",1,"WeaponDrop")
 TNT1 A 0 A_PlaySoundEx("weapons/sawidle","SoundSlot6",0)
 SAWR ABCDEF 1 A_WeaponReady
 TNT1 A 0 A_TakeInventory("Gasoline", 1)
 TNT1 A 0 A_PlaySoundEx("weapons/sawidle","SoundSlot6",0)
 SAWR ABCDEF 1 A_WeaponReady
 TNT1 A 0 A_FireCustomMissile("LSawSmoke",250,0,20,-5,0)
 TNT1 A 0 A_PlaySoundEx("weapons/sawidle","SoundSlot6",0)
 SAWR ABCDEF 1 A_WeaponReady
 TNT1 A 0 A_FireCustomMissile("LSawSmoke",250,0,20,-5,0)
 TNT1 A 0 A_PlaySoundEx("weapons/sawidle","SoundSlot6",0)
 SAWR ABCDEF 1 A_WeaponReady
 TNT1 A 0 A_FireCustomMissile("LSawSmoke",250,0,20,-5,0)
 Goto Ready + 15
 
 Select:
 TNT1 A 0 SetPlayerProperty(0,0,2)
 TNT1 A 1 A_Raise
 Loop

 Deselect:
 TNT1 A 0 A_StopSoundEx("SoundSlot6")
 TNT1 A 0 A_StopSoundEx("SoundSlot7")
 SAWR A 0 A_JumpIfInventory("SawOff", 1, 1)
 SAWR A 1 A_PlaySoundEx("weapons/sawdown","weapon",0)
 SAWR BC 3 A_TakeInventory("SawOff",1)
 SAWR DE 4 A_TakeInventory("SawOn",1)
 SAWR F 6
 SAWD ABCDE 1
 TNT1 A 20
 TNT1 A 1 A_Lower
 Wait

 Fire:
 TNT1 A 0 A_JumpIfNoAmmo ("NoAmmoReady")
 TNT1 A 0 A_JumpIfInventory ("SawOff", 1, "AltFire")
 SAWF ABCDEFG 1
 TNT1 A 0 A_ReFire
 SAWF GFEDCBA 1
 Goto Ready + 15
    
 Hold:
 SAWF F 0 A_StopSoundEx("SoundSlot6")
 SAWF F 0 A_JumpIfNoAmmo ("NoAmmoReady")
 SAWF F 2 A_PlaySoundEx("weapons/sawfull","SoundSlot7",0)
 SAWF G 2
 TNT1 A 0 A_CustomPunch(0,0,0,"FMSawPuff", 52)
 TNT1 AAA 0 A_CustomPunch(4,1,0,"FMSawPuff", 52)
 SAWA D 0 A_TakeInventory("Gasoline", 3)
 SAWF G 0 A_FireCustomMissile("LSawSmoke",250,0,20,-5,0)
 SAWF F 2 A_Refire
 SAWF EDCB 1
 TNT1 A 0 A_FireCustomMissile("LSawSmoke",250,0,20,-5,0)
 TNT1 A 0 A_StopSoundEx("SoundSlot7")
 Goto Ready + 15

 AltFire:
 SAWF A 0 A_JumpIfInventory("SawOff", 1, "TurnOn")
 SAWF F 0 A_StopSoundEx("SoundSlot6")
 SAWF F 0 A_PlaySoundEx("weapons/sawdown","weapon",0)
 SAWR ABC 1
 SAWR DEF 2
 SAWR ABC 3
 SAWR DEF 4
 SAWR A 1 A_TakeInventory("SawOn", 1)
 SAWF A 1 A_GiveInventory("SawOff", 1)
 goto OffReady
 
 TurnOn:
 SAWD A 1 A_GiveInventory("SawOn", 1)
 SAWD A 1 A_TakeInventory("SawOff", 1)
 SAWD ABCDE 1
 goto Ready

Death:
       DHSP A 0 A_SpawnItem("DroppedChainsaw",0,0,0,0)
       TNT1 A 0 A_FadeOut(1.0)
       goto death + 1
 }
}
(0003261)
TIHan   
2012-04-14 23:50   
Does this happen in 98d?
(0003262)
unknownna   
2012-04-14 23:54   
> Does this happen in 98d?

No.
(0003263)
TIHan   
2012-04-15 00:16   
Ok, then that means we need to identify which build it broke it in specifically.
(0003264)
unknownna   
2012-04-15 00:51   
3299 : OK
3417 : Broken
(0003265)
TIHan   
2012-04-15 01:18   
I'm going to make a guess and it had something to do with how states are handled. Torr re-did some of that work. We need his input on this.
(0003266)
Torr Samaho   
2012-04-15 02:15   
> 3299 : OK
> 3417 : Broken

Can you track this down further with the builds listed here?
(0003268)
unknownna   
2012-04-15 02:24   
Quote from "Torr Samaho"
Can you track this down further with the builds listed here?

3411 : Broken
3392 : OK
(0003269)
Torr Samaho   
2012-04-15 02:38   
(edited on: 2012-04-15 02:43)
This could be caused by the changes in revision 235c909a5f2f.

SERVERCOMMANDS_SetPlayerPSprite / SERVERCOMMANDS_SetThingFrame did nothing under certain conditions. Possibly the fact that these functions were broken concealed some other bug. Or the state setting simply doesn't work as intended. I will need to look into this in more detail.

EDIT: I'm pretty sure client_SetPlayerPSprite needs to be adapted and also know how. I'll do this tomorrow.

(0003271)
TIHan   
2012-04-15 02:46   
> This could be caused by the changes in revision 235c909a5f2f.

I can confirm that is the cause. Just tested it.
(0003284)
Torr Samaho   
2012-04-15 14:09   
(edited on: 2012-04-15 15:08)
I found out what's going on (even though client_SetPlayerPSprite is bugged, this way not causing this), but will test the fix a little more before committing.

EDIT: I committed the fix, still need to fix client_SetPlayerPSprite though (which was already bugged in 98d).

(0003309)
Torr Samaho   
2012-04-15 22:28   
The new beta build I just uploaded contains all the fixes. Please test it very thoroughly.
(0003313)
unknownna   
2012-04-16 00:24   
(edited on: 2012-04-16 00:59)
The client is no longer blocked from selecting other weapons, but the sprite animation bugs up if there's some latency (most noticeable with a ping of 300-600). But this also happens in 98d.

And if you fire the "Zombie_" weapon before selecting another weapon while pressing +attack in a fast manner (600 ping), the next weapon's select state will be skipped. It's pretty nasty as you can see in the uploaded screenshot. The client starts to fire the SSG before it's raised on the server. You can reproduce this with the example WAD by giving yourself a SSG. This also happens in 98d.

Here's the custom "Zombie_" weapon:

actor Zombie_ : Pistol
{
  Weapon.SlotNumber 2
  states
  {
  Fire:
    PISG A 1
    PISG A 1 A_JumpIf (tid==0, 1)
    PISG A 1
    goto Ready
  }
}


(0003314)
Torr Samaho   
2012-04-16 01:16   
The remaining issues are caused by the way jumps are handled by the clients. Possibly this could be improved if we let the clients try to predict the jump outcome, but I'm not sure if this will cause more harm than good.
(0006668)
Arco   
2013-07-16 16:49   
Fixed. (since v1.0)