[a12f2778460ccc17] [Duke] Issue with changing horiz from CON

Moderator: Raze Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
NY00123
Posts: 32
Joined: Sat Apr 25, 2020 3:48 pm

[a12f2778460ccc17] [Duke] Issue with changing horiz from CON

Post by NY00123 »

I'm not entirely sure there's a good way to solve this, given Raze-specific modifications related to the player's viewing angles, but going to report anyway.

By changing the definition of the actor APLAYER in Duke3D v1.5's GAME.CON to start with the following code, the player's ang and horiz fields are updated with constant rates, as long as you're pressing on the "Use" key.

This code is EDuke 2.0 and EDuke32-OldMP compatible.

With Raze, this can lead to problems, like making it difficult to free the player from looking down. Even with the "ang" field, there can be a sudden large change in the angle, which might be a side-effect of a wraparound.

Code: Select all

gamevar MYNEWTEMP 0 1 // TEST VAR
actor APLAYER MAXPLAYERHEALTH PSTAND 0 0
  // TEST BEGIN
  ifhitspace
  {
    getplayer[THISACTOR].horiz MYNEWTEMP
    addvar MYNEWTEMP -8
    setplayer[THISACTOR].horiz MYNEWTEMP
    getplayer[THISACTOR].ang MYNEWTEMP
    addvar MYNEWTEMP 8
    setplayer[THISACTOR].ang MYNEWTEMP
  }
  // TEST END
I don't know if there's a relevant EDuke 2.0 TC which takes advantage of this capability. TeamDuke beta v0.62 is an example, but it's a multiplayer TC, which should be less relevant.
The TeamDuke v0.62 patch has a CTFSAMP.CON file within a GRP, in which there's ladder climbing code that covers a read of the horiz field. There's also commented out teleportation code, which can modify the ang and horiz fields.
Attachments
Duke_0000.png
User avatar
mjr4077au
Posts: 830
Joined: Sun Jun 16, 2019 9:17 pm
Graphics Processor: nVidia with Vulkan support
Location: Gosford NSW, Australia
Contact:

Re: [a12f2778460ccc17] [Duke] Issue with changing horiz from

Post by mjr4077au »

Thanks for the report on this :). There's usually always a way to solve most things, including all of this stuff.

Commit 39fe9efaffc6652993fe2a4708ced8d770d2122a resolves the angle snapping back when you reach 2048.
Commit 16886895b0124912ab2587a9139af2bc98053679 resolves the horizon continually being trapped between trying to set a targeted amount while returning to centre.

Please give it a test and report back if there's any issues!
NY00123
Posts: 32
Joined: Sat Apr 25, 2020 3:48 pm

Re: [a12f2778460ccc17] [Duke] Issue with changing horiz from

Post by NY00123 »

Thanks for working on the issues!

The problem with the player angle wrapping is resolved. There's still a problem with the horiz field. I should maybe clarify how to reproduce it, assuming an appropriately modified GAME.CON replacement file is used:

- Start Duke3D and load E1L1.
- Continuously press on the "use" key. Duke should slowly turn right and look down.
- When the player can't look further down, it'll be quite difficult to center the view. You may have to do something like concurrently pressing on "Look Up" and "Use" for a sec, and then press just on "Use" for a shorter while. The problem may persist even after starting a new game of Duke.

In order to reproduce this via a command on Linux, what I found to work for me was changing to a directory with defs.con, user.con and the modified game.con file, and then using a command like this:

Code: Select all

/path/to/raze -x gametst.con -file gametst.con
Post Reply

Return to “Closed Bugs [Raze]”