View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0004598 | The Dark Mod | Coding | public | 06.08.2017 04:38 | 06.08.2017 11:04 |
Reporter | stgatilov | Assigned To | stgatilov | ||
Priority | normal | Severity | major | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | SVN | ||||
Target Version | TDM 2.06 | Fixed in Version | TDM 2.06 | ||
Summary | 0004598: Initializations like "float var = vec_x;" no longer compile | ||||
Description | This code does not compile: vector va = $player1.getViewAngles(); va = anglemod360(va); // normalize the angle vector so each part is 0->360 float yaw = va_y; The last line is the reason. | ||||
Steps To Reproduce | Copy/paste the above snippet e.g. into player::init function in scripts, and start TDM. Most likely any other place in the compiled code is suitable too. | ||||
Tags | No tags attached. | ||||
The last line is wrong type of initialization, because a component of a vector (like "va_y") has type "vector float", which is not the same as just "float". This new type "vector float" appeared with x64 branch merge, so it was pulled from dhewm3 repository. In original Doom3 (and TDM 2.05), components of vectors have type "float". It seems that such expressions are present only in airship-related code. But there can also be player scripts using this =( |
|
Fixed in SVN revision 7058. I simply returned the old code back (reverting dhewm3 changes). It places three float variables "vec_x", "vec_y", "vec_z" one after another, then points the variable "vec" to the same address as "vec_x". This plan works perfectly when sizeof(float) = 4 and offsets of vectors components are: x = 0, y = 4, z = 8. In dhewm3, they had to change it because they made sizeof(float) = 8. |
|
Date Modified | Username | Field | Change |
---|---|---|---|
06.08.2017 04:38 | stgatilov | New Issue | |
06.08.2017 04:38 | stgatilov | Status | new => assigned |
06.08.2017 04:38 | stgatilov | Assigned To | => stgatilov |
06.08.2017 04:39 | stgatilov | Note Added: 0009051 | |
06.08.2017 07:59 | stgatilov | Relationship added | related to 0004520 |
06.08.2017 11:03 | stgatilov | Note Added: 0009054 | |
06.08.2017 11:04 | stgatilov | Status | assigned => resolved |
06.08.2017 11:04 | stgatilov | Fixed in Version | => TDM 2.06 |
06.08.2017 11:04 | stgatilov | Resolution | open => fixed |