2025-07-19 21:13 CEST

View Issue Details Jump to Notes ]
IDProjectCategoryView StatusLast Update
0002200Spring engineLuapublic2010-11-11 01:27
ReporterFLOZi 
Assigned ToKloot 
PrioritynormalSeverityminorReproducibilityalways
StatusresolvedResolutionfixed 
Product Version0.82.6.1 
Target VersionFixed in Version 
Summary0002200: COLVOL_TYPE_DISABLED doesn't work with Spring.SetUnitPieceCollisionVolumeData
DescriptionThe callout calls CollisionVolume::Init(const float3& scales, const float3& offsets, int vType, int tType, int pAxis)

Which has the line:

volumeType = std::max(vType, 0) % COLVOL_NUM_SHAPES;

As the value of COLVOL_TYPE_DISABLED is -1, it gets changed into a 0 and thus an ellipsoid collision volume instead of none at all.
Additional InformationThe results of this can be seen in S44 r3178.

Image here: http://i55.tinypic.com/r8ux7d.jpg
TagsNo tags attached.
Checked infolog.txt for Errors
Attached Files

-Relationships
+Relationships

-Notes

~0005819

Kloot (developer)

Last edited: 2010-11-03 19:00

It's not obvious, but COLVOL_TYPE_DISABLED is not meant to be used as a value for the vType parameter. Assuming the intent is to disable coldet for a single unit's piece, pass true for affectLocal (third arg) and false for enableLocal (fifth arg).

~0005821

FLOZi (reporter)

Last edited: 2010-11-04 01:11

Ah. I want to disable the coldet for those pieces for all instances of units with that model. Is that possible currently?

edit: Yeah, that solution works for the first unit with that model, but not subsequent units (without re-running the callout). Is there some reason why a simple if (vType == -1){ volumeType = COLVOL_TYPE_DISABLED;} solution is problematic?

edit2: Nevermind! setting enableGlobal as false results in the desired behaviour. Still, as it is not obvious that COLVOL_TYPE_DISABLED should not be passed, is it feasible to account for it being used?

+Notes

-Issue History
Date Modified Username Field Change
2010-11-03 18:05 FLOZi New Issue
2010-11-03 18:59 Kloot Note Added: 0005819
2010-11-03 19:00 Kloot Note Edited: 0005819
2010-11-04 01:04 FLOZi Note Added: 0005821
2010-11-04 01:08 FLOZi Note Edited: 0005821
2010-11-04 01:11 FLOZi Note Edited: 0005821
2010-11-11 01:27 Kloot Status new => resolved
2010-11-11 01:27 Kloot Resolution open => fixed
2010-11-11 01:27 Kloot Assigned To => Kloot
+Issue History