MantisBT - Zandronum
View Issue Details
0001924Zandronum[All Projects] Suggestionpublic2014-08-17 15:212018-09-30 22:15
ZzZombo 
Torr Samaho 
normalmajorN/A
closedfixed 
2.0-beta 
3.03.0 
0001924: Backport IsTIDUsed() and UniqueTID() in v2.0
These functions are very important in script-heavy mods. The first function basically replaces ThingCount(T_NONE,<TID>), but the main advantage is that it doesn't need to count EVERY actor in the game, it stops once an actor w/ the given TID is found and it also counts dead things; currently you have to use something like if(!SpawnSpotForced("dummy",TID)) if you really have to be sure the TID is free and as you can imagine, that resource and bandwidth costly. The second function is not that important, and can be written in ACS, but those two functions better to come in pair, since one uses another.
I work on a mod that to be compatible w/ the most other modifications uses only free TIDs, and I imagined how horrible is the fact every call to UnusedTID() (my implementation of UniqueTID()) counts all actors present!
No tags attached.
child of 0002172closed Torr Samaho Upgrade GZDoom base to 1.8.6 
? 1924.wad (10,077) 2015-11-26 21:52
/tracker/file_download.php?file_id=1694&type=bug
Issue History
2014-08-17 15:21ZzZomboNew Issue
2014-08-17 15:54MonsterovichNote Added: 0010213
2014-08-17 15:54MonsterovichNote Edited: 0010213bug_revision_view_page.php?bugnote_id=10213#r5530
2014-08-17 15:56MonsterovichNote Edited: 0010213bug_revision_view_page.php?bugnote_id=10213#r5531
2014-08-17 15:57MonsterovichNote Edited: 0010213bug_revision_view_page.php?bugnote_id=10213#r5532
2014-08-17 15:59MonsterovichNote Edited: 0010213bug_revision_view_page.php?bugnote_id=10213#r5533
2014-08-17 15:59MonsterovichNote Edited: 0010213bug_revision_view_page.php?bugnote_id=10213#r5534
2014-08-31 19:19Torr SamahoNote Added: 0010244
2014-09-01 08:15Edward-sanNote Added: 0010246
2014-09-01 08:15Edward-sanNote Edited: 0010246bug_revision_view_page.php?bugnote_id=10246#r5556
2014-09-04 06:28ZzZomboNote Added: 0010247
2014-09-21 15:33Torr SamahoNote Added: 0010283
2014-09-21 19:22DuskAssigned To => Torr Samaho
2014-09-21 19:22DuskStatusnew => needs testing
2015-05-10 22:15WaTaKiDTarget Version => 3.0
2015-05-10 22:15WaTaKiDRelationship addedchild of 0002172
2015-11-26 21:52arkoreFile Added: 1924.wad
2015-11-26 21:54arkoreNote Added: 0013886
2015-11-28 19:53DuskStatusneeds testing => resolved
2015-11-28 19:53DuskFixed in Version => 3.0
2015-11-28 19:53DuskResolutionopen => fixed
2018-09-30 22:15Blzut3Statusresolved => closed

Notes
(0010213)
Monsterovich   
2014-08-17 15:54   
(edited on: 2014-08-17 15:59)
I think, it's possible to backport all acs functions from 2.7.1 to zan 2.0.

For example: GetActorClass is VERY useful for modders and for me too, but it's 2.7.1. D:

(0010244)
Torr Samaho   
2014-08-31 19:19   
I started some experiments on this in the accounts branch:'https://bitbucket.org/Torr_Samaho/zandronum-accounts [^]'
(0010246)
Edward-san   
2014-09-01 08:15   
The UniqueTID stuff has a problem with overflow checking and with input parameters, so there are two commits that I made to fix it in zdoom:'https://github.com/rheit/zdoom/commit/2501dc6df68e749094b4517a48c81f9a7b4fe1d2 [^]' and'https://github.com/rheit/zdoom/commit/f44dc926e6880777f96f884b42e4dd95f665b097 [^]'

(0010247)
ZzZombo   
2014-09-04 06:28   
Played with the new binary given by Mazter, can confirm string manipulation and most of used functions work fine. For the rest I can't say.
(0010283)
Torr Samaho   
2014-09-21 15:33   
I ported the two patches mentioned in 0001924:0010246 and transplanted everything to our main repository.
(0013886)
arkore   
2015-11-26 21:54   
I tested this (1924.wad) with:
- latest zan3 build r151123-1947-980fac1 (offline)
- latest zan3 build r151123-1947-980fac1 (online)
- gzdoom 1.8.6 (offline)

Results were as expected.