Commit a644d94
Remove redundant m_pos from CJumpNode; add GetRadius() accessor
CJumpNode stored a private m_pos field that duplicated the position
already held by its Objects[] entry. The field was set once during
construction and never updated afterward, so any subsequent movement
(e.g. FRED dragging) would leave m_pos stale while Objects[m_objnum].pos
held the authoritative value. Every external caller already used
GetSCPObject()->pos instead; GetPosition() had zero call sites.
- Remove the m_pos field and its initialization in both constructors,
the move constructor, and the move-assignment operator.
- Pass the constructor's position argument directly to obj_create()
instead of routing through m_pos.
- Repoint GetPosition() at Objects[m_objnum].pos so it always returns
the live, up-to-date position.
- Add GetRadius() to expose the cached m_radius, and use it in
jumpnode_get_which_in() instead of the redundant model_get_radius()
call.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 3f85d61 commit a644d94
2 files changed
Lines changed: 24 additions & 23 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | 27 | | |
32 | 28 | | |
33 | 29 | | |
34 | 30 | | |
35 | 31 | | |
36 | 32 | | |
37 | | - | |
38 | | - | |
39 | | - | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
40 | 38 | | |
41 | | - | |
| 39 | + | |
42 | 40 | | |
43 | 41 | | |
44 | 42 | | |
45 | | - | |
| 43 | + | |
46 | 44 | | |
47 | 45 | | |
48 | 46 | | |
49 | 47 | | |
50 | 48 | | |
51 | 49 | | |
52 | 50 | | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | | - | |
57 | | - | |
| 51 | + | |
58 | 52 | | |
59 | | - | |
60 | | - | |
61 | | - | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
62 | 56 | | |
63 | 57 | | |
64 | 58 | | |
| |||
81 | 75 | | |
82 | 76 | | |
83 | 77 | | |
84 | | - | |
85 | 78 | | |
86 | 79 | | |
87 | 80 | | |
| |||
106 | 99 | | |
107 | 100 | | |
108 | 101 | | |
109 | | - | |
110 | 102 | | |
111 | 103 | | |
112 | 104 | | |
| |||
160 | 152 | | |
161 | 153 | | |
162 | 154 | | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
| |||
190 | 190 | | |
191 | 191 | | |
192 | 192 | | |
193 | | - | |
| 193 | + | |
| 194 | + | |
194 | 195 | | |
195 | 196 | | |
196 | 197 | | |
| |||
536 | 537 | | |
537 | 538 | | |
538 | 539 | | |
539 | | - | |
| 540 | + | |
540 | 541 | | |
541 | 542 | | |
542 | 543 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
48 | | - | |
49 | 48 | | |
50 | 49 | | |
51 | 50 | | |
| |||
65 | 64 | | |
66 | 65 | | |
67 | 66 | | |
| 67 | + | |
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| |||
0 commit comments