Zandronum Chat @ irc.zandronum.com
#zandronum
Get the latest version: 3.0
Source Code

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0002649Zandronum[All Projects] Suggestionpublic2016-02-23 16:402017-06-28 01:46
ReporterXsnake 
Assigned ToDusk 
PrioritynormalSeveritytweakReproducibilityN/A
StatusresolvedResolutionfixed 
PlatformMicrosoftOSWindowsOS VersionXP/Vista/7
Product Version3.0-beta 
Target Version3.0Fixed in Version3.0 
Summary0002649: Extend SetActivator so that 64 players can be addressed
DescriptionRight now, only AAPTR_PLAYER1 to AAPTR_PLAYER8 can be addressed. It would be nice to have all 64 players addressable that way. This is particularly useful when it comes to dealing with players in ACS without assigning them a TID.
Attached Files? file icon setactivatortoplayer.pk3 [^] (1,094 bytes) 2017-05-07 20:52

- Relationships

-  Notes
User avatar (0014480)
Dusk (developer)
2016-02-23 17:55

This one has no easy solution. The actor pointer design is rather short-sighted and its design didn't take Zandronum into account at all. This particular case can be easily solved with a SetActivatorToPlayer function but actor pointers are present everywhere so a generic solution would be great for that...
User avatar (0014490)
ZzZombo (reporter)
2016-02-24 15:29

HUH?
SetActivator(0,AAPTR_PLAYER1<<PlayerNumber());
User avatar (0014491)
Dusk (developer)
2016-02-24 17:36

And how do you stuff 64 distinct flags into a 32-bit integer?
User avatar (0014493)
throwaway (reporter)
2016-02-24 20:03

You could use the highest 8 bits to store players 1 through 64 (up to 256), in addition to the current AAPTR_PLAYER[1-8]. It wouldn't be a simple bit shift anymore or AND check anymore, but it hopefully wouldn't collide with any new actor pointers from ZDoom later on.

Since only one selector from each category is supported, it should work with the other pointers just fine - I'd say ignore AAPTR_PLAYER[1-8] if a last-8-bits player pointer is used.
User avatar (0014496)
Dusk (developer)
2016-02-25 14:36
edited on: 2016-02-25 14:43

Actually yeah, I could define the remaining 56 players as composite bits and thus store them in the 0x40-0x2000 space. Of course I'm not going to be storing 56 more enum definitions so I'll have to make a new formula to build these.

EDIT: Actually they don't really look very easily computable. It's easier for me to just generate a table of them.

User avatar (0014497)
Xsnake (reporter)
2016-02-25 16:29

After some investigations, I ran into this old pull request :

https://bitbucket.org/Torr_Samaho/zandronum-old/pull-requests/88/added-aaptr_player_mask-so-that-all-64/diff [^]

Is there something wrong with the implementation proposed here ?
User avatar (0014498)
Dusk (developer)
2016-02-25 18:58
edited on: 2016-02-25 19:04

Yeah, that also exists… I remember that Blzut3 was going to come up with a better solution than that, but he never did. I guess we should roll with it.

https://bitbucket.org/Torr_Samaho/zandronum/pull-requests/73 [^]

User avatar (0014499)
throwaway (reporter)
2016-02-25 19:44
edited on: 2016-02-25 19:48

So would that mean player 1 would be at 0x80000000 and player 64 would be at 0x8000003F, in addition to the ZDoom AAPTR_PLAYER[1-8] selectors? Or would it be 0x80000001 to 0x80000040?

Also, does this mean I could potentially choose player 2147483647?

User avatar (0014500)
Dusk (developer)
2016-02-25 20:31

Yeah, that's how it would be.
User avatar (0015141)
StrikerMan780 (reporter)
2016-06-27 18:18
edited on: 2016-06-27 18:51

Instead of screwing around with and potentially conflicting with changes to the SetActivator flags in ZDoom's future... or if someday Zan supports more than 64 players... how about make a new ACS function: SetActivatorToPlayer(int playernumber)?

That way, stuff like "SetActivatorToPlayer(2);" and "SetActivatorToPlayer(ConsolePlayerNumber());" are possible (which if added, would be incredibly useful for some things).

User avatar (0015144)
Torr Samaho (administrator)
2016-06-28 05:59

To me SetActivatorToPlayer sounds like the best solution to this problem so far.
User avatar (0017594)
Dusk (developer)
2017-05-07 17:50

Addedhttps://bitbucket.org/zandronum/zandronum-sandbox/commits/f2bcd84d0c86 [^]
User avatar (0017596)
Torr Samaho (administrator)
2017-05-07 19:54

We decided to go for SetActivatorToPlayer:https://bitbucket.org/Torr_Samaho/zandronum/commits/a8afbe737e3015e2faafc0016598a6e627c167f2 [^]
User avatar (0017711)
Combinebobnt (reporter)
2017-05-19 03:15

How do i test this
User avatar (0017713)
Fused (reporter)
2017-05-19 08:16

https://jenkins.csnxs.uk/job/zandronum/24/label=windows/artifact/ZandroDev-3.0-alpha-r170507-1940windows.7z [^] should have it
User avatar (0017753)
Xsnake (reporter)
2017-05-23 09:07

I quickly recompiled a version of my team radar mod (https://zandronum.com/forum/viewtopic.php?t=7018) using the new SetActivatorToPlayer function. It can be found here :http://xsnake.online.fr/wads/TeamRadar_v4.pk3 [^]
Seems to be working with bots offline and online, but I could not do the test with actual players.
User avatar (0017947)
Ru5tK1ng (updater)
2017-06-28 01:46

Considering no other issues have been reported, I think your testing is sufficient. Reopen if necessary.

Issue Community Support
This issue is already marked as resolved.
If you feel that is not the case, please reopen it and explain why.
Supporters: Visual Vincent Combinebobnt Korshun Monsterovich ibm5155
Opponents: No one explicitly opposes this issue yet.

- Issue History
Date Modified Username Field Change
2016-02-23 16:40 Xsnake New Issue
2016-02-23 17:55 Dusk Note Added: 0014480
2016-02-24 15:29 ZzZombo Note Added: 0014490
2016-02-24 17:36 Dusk Note Added: 0014491
2016-02-24 20:03 throwaway Note Added: 0014493
2016-02-25 14:36 Dusk Note Added: 0014496
2016-02-25 14:43 Dusk Note Edited: 0014496 View Revisions
2016-02-25 16:29 Xsnake Note Added: 0014497
2016-02-25 18:58 Dusk Note Added: 0014498
2016-02-25 19:04 Dusk Note Edited: 0014498 View Revisions
2016-02-25 19:04 Dusk Assigned To => Dusk
2016-02-25 19:04 Dusk Status new => needs review
2016-02-25 19:44 throwaway Note Added: 0014499
2016-02-25 19:44 throwaway Note Edited: 0014499 View Revisions
2016-02-25 19:48 throwaway Note Edited: 0014499 View Revisions
2016-02-25 19:48 throwaway Note Edited: 0014499 View Revisions
2016-02-25 20:31 Dusk Note Added: 0014500
2016-06-27 18:18 StrikerMan780 Note Added: 0015141
2016-06-27 18:19 StrikerMan780 Note Edited: 0015141 View Revisions
2016-06-27 18:20 StrikerMan780 Note Edited: 0015141 View Revisions
2016-06-27 18:50 StrikerMan780 Note Edited: 0015141 View Revisions
2016-06-27 18:51 StrikerMan780 Note Edited: 0015141 View Revisions
2016-06-27 18:51 StrikerMan780 Note Edited: 0015141 View Revisions
2016-06-28 05:59 Torr Samaho Note Added: 0015144
2017-05-07 17:35 Dusk Status needs review => assigned
2017-05-07 17:50 Dusk Note Added: 0017594
2017-05-07 17:50 Dusk Status assigned => needs review
2017-05-07 19:54 Torr Samaho Note Added: 0017596
2017-05-07 19:57 Torr Samaho Status needs review => needs testing
2017-05-07 19:57 Torr Samaho Target Version => 3.0
2017-05-07 20:52 Dusk File Added: setactivatortoplayer.pk3
2017-05-19 03:15 Combinebobnt Note Added: 0017711
2017-05-19 08:16 Fused Note Added: 0017713
2017-05-23 09:07 Xsnake Note Added: 0017753
2017-06-28 01:46 Ru5tK1ng Note Added: 0017947
2017-06-28 01:46 Ru5tK1ng Status needs testing => resolved
2017-06-28 01:46 Ru5tK1ng Resolution open => fixed
2017-06-28 01:46 Ru5tK1ng Fixed in Version => 3.0






Questions or other issues? Contact Us.

Links


Copyright © 2000 - 2017 MantisBT Team
Powered by Mantis Bugtracker