View Issue Details

IDProjectCategoryView StatusLast Update
0005683The Dark ModCodingpublic11.08.2021 16:56
Reporterstgatilov Assigned Tostgatilov  
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Product VersionTDM 2.09 
Target VersionTDM 2.10Fixed in VersionTDM 2.10 
Summary0005683: Support more properties in hot-reload
DescriptionFrom https://forums.thedarkmod.com/index.php?/topic/20493-connection-to-tdm-with-automation/&do=findComment&comment=455212:

This is what doesn't seem to be hotReloading correctly and requires respawning. I'll report more as I find them:
    1) Speakers are not updating "s_shader" and playing the newly selected sound.
    2) Func_emitters are not updating "_color" on particles.
    3) Func_statics are not updating "hide_distance"

From wellingtoncrab on Discord:

Another example would be tweaking the rotation or translate values on movers.
Movers in this context are often doors or fun_rotate entities. Trying to change the swing direction or amount of a door for example is a common thing I like the tweak and it’d be awesome if this was a change you could see right away.

From myself:

A) Moving entity bound to something else is completely broken, because internally new "origin"/"rotation" values from spawnargs are set to LOCAL coordinates relative to bind master.
B) Respawning AI stops with Error, because removal of its bound entities is delayed until the end of the frame (or next frame), but new binds are created immediately, resulting in name conflict.
TagsNo tags attached.

Relationships

related to 0005316 resolvedstgatilov Hot reload feature 

Activities

stgatilov

stgatilov

27.07.2021 15:19

administrator   ~0014197

Supported changing LOD parameters in svn rev 9511.
nbohr1more

nbohr1more

27.07.2021 21:49

developer   ~0014200

Linux compile fails:

/home/randy/tdm_src/trunk/game/Entity.cpp:2978:31: error: operands to ?: have different types ‘const idStr’ and ‘const char*’
    idStr newModelName = m_LOD ? m_LOD->ModelLOD[m_LODLevel] : spawnArgs.GetString( "model" );
                         ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/randy/tdm_src/trunk/game/Entity.cpp:2978:31: note: and each type can be converted to the other
/home/randy/tdm_src/trunk/game/Entity.cpp:3004:30: error: operands to ?: have different types ‘const idStr’ and ‘const char*’
    idStr newSkinName = m_LOD ? m_LOD->SkinLOD[m_LODLevel] : spawnArgs.GetString( "skin" );
                        ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
stgatilov

stgatilov

28.07.2021 01:42

administrator   ~0014202

By the way, updating sounds was fixed in svn rev 9071.
stgatilov

stgatilov

28.07.2021 02:03

administrator   ~0014203

Last edited: 28.07.2021 02:04

Supported _color and shaderParm-s in svn rev 9513.
Including particle emitters, as long as their particle stages has "entityColor 1", of course.
stgatilov

stgatilov

28.07.2021 03:03

administrator   ~0014205

And "noshadows" in svn rev 9516.
stgatilov

stgatilov

28.07.2021 16:17

administrator   ~0014209

More changes:
  r9517. Fixed AI respawning (from DarkRadiant or "respawn" console command).
  r9518. Support "angle" in hot reload (in addition to already supported "rotation").
  r9519. Support changing targets of entity in hot reload.

I also noticed that moving/rotating a mover (door or level) does not work properly.
Its current position is changed to wherever you more it, but when you frob it, it smoothly moves into its old position, and never returns back.
Respawning of course fixes everything... I guess I should fix this along with supporting "rotate" and "translate" spawnargs.


Also, I have found a good way of learning which spawnargs should be supported.
I took rather large map (Behind Closed Doors) and counted how many times each spawnarg is mentioned in it.
Next on the list are: solid, noclipmodel, rotate
stgatilov

stgatilov

29.07.2021 11:41

administrator   ~0014210

Supported BinaryFrobMover in hot reload.

The first two commits are some refactoring:
  r9520. Preparational refactoring of BinaryFrobMover.cpp Should not change behavior.
  r9521. Preparational changes for BinaryFrobMover support in hot reload.
The last one actually adds support:
  r9522. Supported hot reload of BinaryFrobMover: "rotate" and "translate" spawnargs, moving/rotating the entity.

Now changing "origin", "rotation"/"angle" works properly.
Also, changing "rotate" and "translate" works.
stgatilov

stgatilov

30.07.2021 04:10

administrator   ~0014213

Supported moving bound entities:
  r9523. Refactored parsing axis from spawnargs ("rotation" and "angle") into single function.
  r9524. Supported hot-reloading moved/rotated entities bound to master in a simple way.

It does not work for something bound to animated mesh... too hard to determine initial position of joint in default pose =)
However, it seems that missions use simply bind only (at least BCD), and complicated cases are done via attachments.

I even checked that moving+rotating a door with its handle at the same time works properly.

Issue History

Date Modified Username Field Change
27.07.2021 14:58 stgatilov New Issue
27.07.2021 14:58 stgatilov Status new => assigned
27.07.2021 14:58 stgatilov Assigned To => stgatilov
27.07.2021 14:59 stgatilov Relationship added related to 0005316
27.07.2021 15:19 stgatilov Note Added: 0014197
27.07.2021 21:49 nbohr1more Note Added: 0014200
28.07.2021 01:42 stgatilov Note Added: 0014202
28.07.2021 02:03 stgatilov Note Added: 0014203
28.07.2021 02:04 stgatilov Note Edited: 0014203
28.07.2021 03:03 stgatilov Note Added: 0014205
28.07.2021 03:13 stgatilov Description Updated
28.07.2021 16:17 stgatilov Note Added: 0014209
29.07.2021 11:41 stgatilov Note Added: 0014210
30.07.2021 04:10 stgatilov Note Added: 0014213
11.08.2021 16:56 stgatilov Status assigned => resolved
11.08.2021 16:56 stgatilov Resolution open => fixed
11.08.2021 16:56 stgatilov Fixed in Version => TDM 2.10