2024-04-25 14:24 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0004458Spring engineUnit Scriptingpublic2014-06-26 13:51
ReporterGoogle_Frog 
Assigned ToKloot 
PrioritynormalSeverityminorReproducibilitysometimes
StatusclosedResolutionwon't fix 
Product Version97.0.1+git 
Target VersionFixed in Version 
Summary0004458: 97.0.1-3 Being thrown through the air can let a unit move without calling StartMoving
DescriptionIf a static unit is thrown through the air and given a move order in-flight it sometimes moves without calling StartMoving. The attached replay demonstrates a way to reproduce this.

This is important because it is common to implement units which can deploy when static for some bonus. For example Crabe has a 3x armour bonus when static and with this bug players could create armoured moving Crabes.
Additional InformationMap: Comet Catcher Redux
Game: Zero-K test-7388-c181d9e
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0013355

Jools (reporter)

I think start moving means that unit starts moving with its own engine or similar. It's not called when unit is moved from an explosion, but I think it's supposed to work that way. Maybe wiki should be updated though: http://springrts.com/wiki/Animation-CobCallins

~0013356

Jools (reporter)

Also see: http://springrts.com/phpbb/viewtopic.php?f=14&t=29807&hilit=startmoving&start=20

~0013357

Google_Frog (reporter)

You clearly have not watched the replay although you raise a good point and I now realize that my wording was poor. By 'moving' I mean traveling along the ground in the ordinary way. I must be stuck thinking that 'moving' refers to the thing that units do when they have a move command.

So to be more clear; Sometimes units can fly through the air, hit the ground and start traveling along the ground without StartMoving ever being called. StartMoving should be called when they start traveling along the ground.

~0013358

Jools (reporter)

No, I'm aware of the bug/feature, that's just how the callin works. I wouldn't mind making the StartMove and also Moverate callins more consistent, I think the latter only works for a certain aircraft type.

I encountered the StartMove issue in XTA when setting dynamic Los for landed and airborne planes.but it has always worked that way. You can maybe also use a custom callin with own parameters and send it to lua from cob with those appropriate callins.

~0013360

Kloot (developer)

"Sometimes units can fly through the air, hit the ground and start traveling along the ground without StartMoving ever being called."

If the unit did not come to a full stop after hitting the ground, this is precisely how it should work.

"StartMoving should be called when they start traveling along the ground."

No, it should be called when a unit STARTS moving (the implication being that this unit was NOT moving the previous frame) and not at any other times.

~0013363

Google_Frog (reporter)

Last edited: 2014-06-26 13:43

View 3 revisions

"No, it should be called when a unit STARTS moving (the implication being that this unit was NOT moving the previous frame) and not at any other times. "

No, it should be my way because my way is the useful way. You can define StartMoving any way you like but that does not mean it will be useful for anything. As far as I can tell you are just trying to support your definition with semantics.

In practice StartMoving is used to tell the script of a ground unit that it is now traveling along the ground. Game developers should be able to trigger their walk animations and movement based special abilities with StartMoving. To be used in this way a unit which is walking along the ground has to always have had StartMoving called more recently than StopMoving. Violate this and you end up with skating and exploits. This ticket demonstrates a situation in which this is violated.

To put it another way; StartMoving is broken when game developers no longer use it because it does not do the thing they want it to do. If this bug is not fixed I will have to stop using StartMoving in exploit-prone situations and re-implement it with periodic velocity checks. I've already done this as a temporary solution but it is so bad to have to do it.

~0013364

Kloot (developer)

Not in the mood for pedantries.

You can make a proper feature request and discuss it with other gamedevs.
+Notes

-Issue History
Date Modified Username Field Change
2014-06-26 10:20 Google_Frog New Issue
2014-06-26 10:20 Google_Frog File Added: 20140626_180847_Comet Catcher Redux_97.0.1-3-gda04dd2 develop.sdf
2014-06-26 10:25 Jools Note Added: 0013355
2014-06-26 10:27 Jools Note Added: 0013356
2014-06-26 10:41 Google_Frog Note Added: 0013357
2014-06-26 11:20 Jools Note Added: 0013358
2014-06-26 13:12 Kloot Note Added: 0013360
2014-06-26 13:12 Kloot Status new => closed
2014-06-26 13:12 Kloot Assigned To => Kloot
2014-06-26 13:12 Kloot Resolution open => no change required
2014-06-26 13:42 Google_Frog Note Added: 0013363
2014-06-26 13:42 Google_Frog Status closed => feedback
2014-06-26 13:42 Google_Frog Resolution no change required => reopened
2014-06-26 13:42 Google_Frog Note Edited: 0013363 View Revisions
2014-06-26 13:43 Google_Frog Note Edited: 0013363 View Revisions
2014-06-26 13:51 Kloot Note Added: 0013364
2014-06-26 13:51 Kloot Status feedback => closed
2014-06-26 13:51 Kloot Resolution reopened => won't fix
+Issue History