Skip to content

Commit a5d6e26

Browse files
committed
tier1 fixes
1 parent 686b228 commit a5d6e26

File tree

3 files changed

+33
-30
lines changed

3 files changed

+33
-30
lines changed

include/tier1/utl_dict.inc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,13 @@ methodmap UtlDict < AddressBase {
5555

5656
property UtlMap m_Elements {
5757
public get() {
58-
return LoadFromAddress(this.addr, NumberType_Int32);
58+
return view_as<UtlMap>(this.addr);
5959
}
60-
60+
/*
6161
public set(UtlMap value) {
6262
StoreToAddress(this.addr, value, NumberType_Int32);
6363
}
64+
*/
6465
}
6566

6667
public any Element(int i, int size = 4, NumberType type = NumberType_Int32) {

include/tier1/utl_map.inc

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* Author: blueblur
1919
* Date: 2025-11-13
2020
* url: https://github.com/blueblur0730/modified-plugins
21-
* Version: 1.0.1
21+
* Version: 1.0.2
2222
*/
2323

2424
/*
@@ -134,12 +134,14 @@ methodmap UtlMap < AddressBase {
134134

135135
property UtlRBTree m_Tree {
136136
public get() {
137-
return LoadFromAddress(this.addr + UTL_MAP_OFFSET_TREE, NumberType_Int32);
137+
return view_as<UtlRBTree>(this.addr);
138138
}
139139
#if defined _smmem_included_
140+
/*
140141
public set(UtlRBTree value) {
141-
StoreToAddress(this.addr + UTL_MAP_OFFSET_TREE, value, NumberType_Int32);
142+
StoreToAddress(this.addr, value, NumberType_Int32);
142143
}
144+
*/
143145
#endif
144146
}
145147

@@ -612,7 +614,7 @@ static void Assert_Zero(const char[] tag, const char[] message, any ...)
612614
char sBuffer[512];
613615
VFormat(sBuffer, sizeof(sBuffer), message, 3);
614616
Format(sBuffer, sizeof(sBuffer), "%s: %s.", tag, sBuffer);
615-
_Assert(message);
617+
_Assert(sBuffer);
616618
}
617619

618620
static void _Assert(const char[] message)

include/tier1/utl_rbtree.inc

Lines changed: 24 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
* Author: blueblur
1919
* Date: 2025-11-11
2020
* url: https://github.com/blueblur0730/modified-plugins
21-
* Version: 1.3.1
21+
* Version: 1.3.2
2222
*/
2323

2424
/*
@@ -158,41 +158,41 @@ methodmap Iterator_t < AddressBase {
158158
methodmap UtlRBTreeLinks_t < AddressBase {
159159
property int m_Left {
160160
public get() {
161-
return LoadFromAddress(this.addr + UTL_RBTREE_LINKS_OFFSET_LEFT, NumberType_Int32);
161+
return LoadFromAddress(this.addr + UTL_RBTREE_LINKS_OFFSET_LEFT, NumberType_Int16);
162162
}
163163

164-
public set(const int val) {
165-
StoreToAddress(this.addr + UTL_RBTREE_LINKS_OFFSET_LEFT, val, NumberType_Int32);
164+
public set(int val) {
165+
StoreToAddress(this.addr + UTL_RBTREE_LINKS_OFFSET_LEFT, val, NumberType_Int16);
166166
}
167167
}
168168

169169
property int m_Right {
170170
public get() {
171-
return LoadFromAddress(this.addr + UTL_RBTREE_LINKS_OFFSET_RIGHT, NumberType_Int32);
171+
return LoadFromAddress(this.addr + UTL_RBTREE_LINKS_OFFSET_RIGHT, NumberType_Int16);
172172
}
173173

174-
public set(const int val) {
175-
StoreToAddress(this.addr + UTL_RBTREE_LINKS_OFFSET_RIGHT, val, NumberType_Int32);
174+
public set(int val) {
175+
StoreToAddress(this.addr + UTL_RBTREE_LINKS_OFFSET_RIGHT, val, NumberType_Int16);
176176
}
177177
}
178178

179179
property int m_Parent {
180180
public get() {
181-
return LoadFromAddress(this.addr + UTL_RBTREE_LINKS_OFFSET_PARENT, NumberType_Int32);
181+
return LoadFromAddress(this.addr + UTL_RBTREE_LINKS_OFFSET_PARENT, NumberType_Int16);
182182
}
183183

184-
public set(const int val) {
185-
StoreToAddress(this.addr + UTL_RBTREE_LINKS_OFFSET_PARENT, val, NumberType_Int32);
184+
public set(int val) {
185+
StoreToAddress(this.addr + UTL_RBTREE_LINKS_OFFSET_PARENT, val, NumberType_Int16);
186186
}
187187
}
188188

189189
property int m_Tag {
190190
public get() {
191-
return LoadFromAddress(this.addr + UTL_RBTREE_LINKS_OFFSET_TAG, NumberType_Int32);
191+
return LoadFromAddress(this.addr + UTL_RBTREE_LINKS_OFFSET_TAG, NumberType_Int16);
192192
}
193193

194-
public set(const int val) {
195-
StoreToAddress(this.addr + UTL_RBTREE_LINKS_OFFSET_TAG, val, NumberType_Int32);
194+
public set(int val) {
195+
StoreToAddress(this.addr + UTL_RBTREE_LINKS_OFFSET_TAG, val, NumberType_Int16);
196196
}
197197
}
198198
}
@@ -304,45 +304,45 @@ methodmap UtlRBTree < AddressBase {
304304

305305
property int m_Root {
306306
public get() {
307-
return LoadFromAddress(this.addr + UTL_RBTREE_OFFSET_ROOT, NumberType_Int32);
307+
return LoadFromAddress(this.addr + UTL_RBTREE_OFFSET_ROOT, NumberType_Int16);
308308
}
309309

310310
public set(int val) {
311-
StoreToAddress(this.addr + UTL_RBTREE_OFFSET_ROOT, val, NumberType_Int32);
311+
StoreToAddress(this.addr + UTL_RBTREE_OFFSET_ROOT, val, NumberType_Int16);
312312
}
313313
}
314314

315315
property int m_NumElements {
316316
public get() {
317-
return LoadFromAddress(this.addr + UTL_RBTREE_OFFSET_NUM_ELEMENTS, NumberType_Int32);
317+
return LoadFromAddress(this.addr + UTL_RBTREE_OFFSET_NUM_ELEMENTS, NumberType_Int16);
318318
}
319319

320320
#if defined _smmem_included_
321321
public set(int val) {
322-
StoreToAddress(this.addr + UTL_RBTREE_OFFSET_NUM_ELEMENTS, val, NumberType_Int32);
322+
StoreToAddress(this.addr + UTL_RBTREE_OFFSET_NUM_ELEMENTS, val, NumberType_Int16);
323323
}
324324
#endif
325325

326326
}
327327

328328
property int m_FirstFree {
329329
public get() {
330-
return LoadFromAddress(this.addr + UTL_RBTREE_OFFSET_FIRST_FREE, NumberType_Int32);
330+
return LoadFromAddress(this.addr + UTL_RBTREE_OFFSET_FIRST_FREE, NumberType_Int16);
331331
}
332332

333-
public set(const int val) {
334-
StoreToAddress(this.addr + UTL_RBTREE_OFFSET_FIRST_FREE, val, NumberType_Int32);
333+
public set(int val) {
334+
StoreToAddress(this.addr + UTL_RBTREE_OFFSET_FIRST_FREE, val, NumberType_Int16);
335335
}
336336
}
337337

338338
// Iterator_t m_LastAlloc;
339339
property int m_LastAlloc {
340340
public get() {
341-
return LoadFromAddress(this.addr + UTL_RBTREE_OFFSET_LAST_ALLOC, NumberType_Int32);
341+
return LoadFromAddress(this.addr + UTL_RBTREE_OFFSET_LAST_ALLOC, NumberType_Int16);
342342
}
343343

344344
public set(int val) {
345-
StoreToAddress(this.addr + UTL_RBTREE_OFFSET_LAST_ALLOC, val, NumberType_Int32);
345+
StoreToAddress(this.addr + UTL_RBTREE_OFFSET_LAST_ALLOC, val, NumberType_Int16);
346346
}
347347
}
348348

@@ -1421,7 +1421,7 @@ static void Assert(bool condition, const char[] tag, const char[] message, any .
14211421
char sBuffer[512];
14221422
VFormat(sBuffer, sizeof(sBuffer), message, 4);
14231423
Format(sBuffer, sizeof(sBuffer), "%s: %s.", tag, sBuffer);
1424-
_Assert(message);
1424+
_Assert(sBuffer);
14251425
}
14261426
}
14271427

@@ -1430,7 +1430,7 @@ static void Assert_Zero(const char[] tag, const char[] message, any ...)
14301430
char sBuffer[512];
14311431
VFormat(sBuffer, sizeof(sBuffer), message, 3);
14321432
Format(sBuffer, sizeof(sBuffer), "%s: %s.", tag, sBuffer);
1433-
_Assert(message);
1433+
_Assert(sBuffer);
14341434
}
14351435

14361436
static void _Assert(const char[] message)

0 commit comments

Comments
 (0)