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

Moderator: Raze Developers

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

Postby NY00123 » Sun Mar 28, 2021 3:53 pm

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 allExpand view
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.
You do not have the required permissions to view the files attached to this post.
NY00123
 
Joined: 25 Apr 2020

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

Postby mjr4077au » Wed Mar 31, 2021 3:04 am

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!
User avatar
mjr4077au
 
Joined: 16 Jun 2019
Location: Gosford NSW, Australia
Discord: mjr4077au#1027
Github ID: mjr4077au
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

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

Postby NY00123 » Thu Apr 01, 2021 12:40 pm

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 allExpand view
/path/to/raze -x gametst.con -file gametst.con
NY00123
 
Joined: 25 Apr 2020

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

Postby mjr4077au » Tue Apr 06, 2021 3:23 pm

User avatar
mjr4077au
 
Joined: 16 Jun 2019
Location: Gosford NSW, Australia
Discord: mjr4077au#1027
Github ID: mjr4077au
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support


Return to Closed Bugs

Who is online

Users browsing this forum: No registered users and 0 guests