Duke4.net Forums: Duke Plus and other questions - Duke4.net Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Duke Plus and other questions

#1

Well, I'm back (if anyone remembers me from the 3dRealms forums). Haven't played Duke3d in 5 years or more, so I'm catching up. I installed eduke32_win64_20160704-5811, Duke Plus, and HRP 5.4. I noticed that in Duke Plus, when the ejecting shells land on the ground, they spin (roll) indefinitely. Is there a way to fix this? I found this code, but am unsure what to change:

// action ANULLACTION 0

action SHELLROLLING -1 2 1 1 6
action SHELLSTOPPED -1 1 1 1 1

move SHELLROLL1 48
move SHELLBOUNCE 48 -20
move SHELLBOUNCE2 48
move SHELLROLL2	32
move SHELLROLL3 16
move SHELLSTOP

state shellcode
fall

setvar temp 0
ifvarg underwater 0 setvar temp 1
ifinwater setvar temp 1
ifvare temp 1
{
	ifmove SHELLSTOP nullop else
	{
		ifmove SHELLROLL3 nullop else
		move SHELLROLL3 geth
	}
}




Also, the shadows casted by monsters in Polymost mode look messed up. Any way to fix this?

Posted Image

This post has been edited by Lightning_Hunter: 10 July 2016 - 01:40 PM

0

User is offline   Danukem 

  • Duke Plus Developer

#2

Welcome back! Unfortunately I have developed a serious mental hangup about maintaining DukePlus and haven't touched it in years, even though I have worked on other EDuke32 projects. I have seen the messed up shadows in Polymost when working on Duke Forces, so I know it's a general problem and isn't DukePlus related. With the shell casings...the CON code never changed for them and it used to work (that part you posted is only part of it). I am guessing that what used to be an idle tile number in the HRP has a spinning animation defined on it now, and that is what causes the problem.

LeoD has made a "nixfix" patch for DukePlus which fixes various issues -- the shell casings might be one of them, I'm not sure. I'll post a link to it if I can find it.

EDIT: Here is a link with several things that LeoD put together, scroll down for nixfix: https://forums.duke4...dpost__p__74887

This post has been edited by Trooper Dan: 10 July 2016 - 04:12 PM

0

#3

 Trooper Dan, on 10 July 2016 - 04:09 PM, said:

LeoD has made a "nixfix" patch for DukePlus which fixes various issues -- the shell casings might be one of them, I'm not sure. I'll post a link to it if I can find it.



Thank you for this link. Unfortunately, it does not fix the shell bug. You are right that I did not post all the code. Any idea what is causing this issue?

Spoiler


This post has been edited by Trooper Dan: 10 July 2016 - 10:30 PM
Reason for edit: added spoiler tags to hide code

0

User is offline   Danukem 

  • Duke Plus Developer

#4

 Lightning_Hunter, on 10 July 2016 - 10:11 PM, said:

Thank you for this link. Unfortunately, it does not fix the shell bug. You are right that I did not post all the code. Any idea what is causing this issue?


 Trooper Dan, on 10 July 2016 - 04:09 PM, said:

With the shell casings...the CON code never changed for them and it used to work. I am guessing that what used to be an idle tile number in the HRP has a spinning animation defined on it now, and that is what causes the problem.


The code you found isn't responsible for the spinning on the ground. The shell casings are supposed to rotate while in the air (before that code kicks in). Once on the ground, they get a random angle one time and then roll, and maybe bounce and knock into stuff, which is what that code handles.
0

#5

Ah, well sorry about that. I don't see anything else related to the shells in the code, so I must be missing something. :P

This post has been edited by Lightning_Hunter: 11 July 2016 - 09:18 AM

0

#6

 Lightning_Hunter, on 11 July 2016 - 09:17 AM, said:

Ah, well sorry about that. I don't see anything else related to the shells in the code, so I must be missing something. :P


For your problem you must search into the dukeplus.def, not into the .con's, you must change the bullets frame animations.

"Gun shells"

model "DUKEPLUS_RESOURCES/GRAPHICS/shell.md3" {
scale 5 shade 5
skin { pal 0 file "DUKEPLUS_RESOURCES/GRAPHICS/shell.png" }
anim { frame0 "FRAME2" frame1 "FRAME10" fps 40 flag 0 }
anim { frame0 "FRAME11" frame1 "FRAME16" fps 30 flag 1 }
frame { name "FRAME2" tile0 2533 tile1 2534 }

}

"Shotgun shells"

model "DUKEPLUS_RESOURCES/GRAPHICS/shell.md3" {
scale 7 shade 5
skin { pal 0 file "DUKEPLUS_RESOURCES/GRAPHICS/shell2.png" }
anim { frame0 "FRAME2" frame1 "FRAME10" fps 40 flag 0 }
anim { frame0 "FRAME11" frame1 "FRAME16" fps 30 flag 1 }
frame { name "FRAME2" tile 2535 }
frame { name "FRAME2" tile 6325 }

}

These are JUST INDICATIONS where the lines are, not replacement. I found the solution to this in another mod but I'm not sure that can be applied to Dukeplus too.

This post has been edited by Fantinaikos: 11 July 2016 - 11:10 AM

0

User is offline   Danukem 

  • Duke Plus Developer

#7

 Fantinaikos, on 11 July 2016 - 11:06 AM, said:

For your problem you must search into the dukeplus.def, not into the .con's, you must change the bullets frame animations.


Actually, no. It would be even simpler to just disable model animation when the shell hits the ground.

So, in the state "state shellcode" just add the line "setactor[THISACTOR].mdflags 2"
0

#8

Even with this method the bullets, once hit the ground, roll away until stops instead of spinning?
0

User is offline   Danukem 

  • Duke Plus Developer

#9

 Fantinaikos, on 11 July 2016 - 11:47 AM, said:

Even with this method the bullets, once hit the ground, roll away until stops instead of spinning?


You can see from the code posted above that they were never intended to spin on the ground (even though that may have been nice, if done in moderation).

The code that makes them move uses the good old move command, which makes sprites go in the direction of their angle. Spinning the model without an animation would constantly change the angle, so that wouldn't work (with the current code).
0

#10

If all else fails, I wouldn't mind if someone just told me how to stop the spinning altogether with the shells.
0

User is offline   Danukem 

  • Duke Plus Developer

#11

 Lightning_Hunter, on 11 July 2016 - 12:52 PM, said:

If all else fails, I wouldn't mind if someone just told me how to stop the spinning altogether with the shells.


So, now that I'm actually working on it, I notice that I already had the mdflags 2 set in part of my code, which used to successfully stop the shells from spinning. Now I'm wondering if mdflags is broken in EDuke32. EDIT: Yeah setting mdflags to 2 on the sprites does not stop the animation like it is supposed to. I checked in both polymer and polymost. The flag isn't completely broken, though. If I set mdflags 2 on all sprites (in EVENT_GAME) animation does stop on other models. But for some reason it doesn't work on the shells.

This post has been edited by Trooper Dan: 12 July 2016 - 12:09 AM

0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic


All copyrights and trademarks not owned by Voidpoint, LLC are the sole property of their respective owners. Play Ion Fury! ;) © Voidpoint, LLC

Enter your sign in name and password


Sign in options