MantisBT - Zandronum |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0004007 | Zandronum | [All Projects] Suggestion | public | 2022-05-29 07:58 | 2022-12-01 18:50 |
|
Reporter | Penguin | |
Assigned To | Kaminsky | |
Priority | normal | Severity | feature | Reproducibility | N/A |
Status | resolved | Resolution | fixed | |
Platform | | OS | | OS Version | |
Product Version | 3.1 | |
Target Version | 3.2 | Fixed in Version | 3.2 | |
|
Summary | 0004007: New actor pointer that can return a player's camera view |
Description | Currently TID is required to get the player number that is spying for. Therefore, if players are using the same TID, it cannot be obtained.
Current method
int GetPlayerSpyPN (int MyPN)
{
SetActivator(CheckPlayerCamera(MyPN)); //TID assignment required
int SpyPN = ConsolePlayerNumber();
SetActivatorToPlayer(MyPN);
return SpyPN;
} |
Steps To Reproduce | |
Additional Information | |
Tags | No tags attached. |
Relationships | |
Attached Files | 4007.wad (1,946) 2022-12-01 15:17 https://zandronum.com/tracker/file_download.php?file_id=2786&type=bug
4007_v2.wad (1,883) 2022-12-01 18:05 https://zandronum.com/tracker/file_download.php?file_id=2788&type=bug |
|
Issue History |
Date Modified | Username | Field | Change |
2022-05-29 07:58 | Penguin | New Issue | |
2022-05-29 14:53 | Penguin | Note Added: 0022243 | |
2022-06-04 15:00 | Penguin | Note Added: 0022262 | |
2022-06-06 20:11 | Kaminsky | Note Added: 0022264 | |
2022-06-06 20:11 | Kaminsky | Assigned To | => Kaminsky |
2022-06-06 20:11 | Kaminsky | Status | new => needs testing |
2022-06-06 20:11 | Kaminsky | Product Version | => 3.1 |
2022-06-06 20:11 | Kaminsky | Target Version | => 3.2 |
2022-06-06 20:11 | Kaminsky | Summary | GetPlayerNumberForSpy() => New actor pointer that can return a player's camera view |
2022-06-06 20:11 | Kaminsky | Description Updated | bug_revision_view_page.php?rev_id=13638#r13638 |
2022-12-01 15:17 | Kaminsky | File Added: 4007.wad | |
2022-12-01 15:23 | Kaminsky | Note Added: 0022512 | |
2022-12-01 17:38 | WaTaKiD | Note Added: 0022516 | |
2022-12-01 18:05 | Kaminsky | File Added: 4007_v2.wad | |
2022-12-01 18:07 | Kaminsky | Note Added: 0022517 | |
2022-12-01 18:08 | Kaminsky | Note Edited: 0022517 | bug_revision_view_page.php?bugnote_id=22517#r13775 |
2022-12-01 18:46 | WaTaKiD | Note Added: 0022519 | |
2022-12-01 18:50 | Kaminsky | Note Added: 0022520 | |
2022-12-01 18:50 | Kaminsky | Status | needs testing => resolved |
2022-12-01 18:50 | Kaminsky | Fixed in Version | => 3.2 |
2022-12-01 18:50 | Kaminsky | Resolution | open => fixed |
Notes |
|
|
For server
GetPlayerNumberForSpy()
For client
GetConsolePlayerNumberForSpy() |
|
|
|
I made a mistake. This is correct.
int GetPlayerSpyPN (int PN)
{
int SpyPN;
SetActivator(CheckPlayerCamera(PN)); //TID assignment required
SpyPN = PlayerNumber(); //TID assignment required
SetActivatorToPlayer(PN);
return SpyPN;
} |
|
|
|
After some thought and also discussing it with Penguin on Discord, adding a new actor pointer (e.g. AAPTR_PLAYER_GETCAMERA) that returns the actor a player is currently looking from would be more useful, instead of adding one or two new ACS functions that can only return which player is being spied on. As such, this commit adds the new pointer in 3.2:'http://hg.osdn.net/view/zandronum/zandronum-stable/rev/cf213fe93126 [^]'
I updated the ticket info to reflect on the new feature. |
|
|
|
I uploaded an example WAD to test AAPTR_PLAYER_GETCAMERA. Here's how it works.
1a. If you're spying on yourself, then the message "you are viewing yourself" is displayed on the screen.
1b. If you're spying on another player, then the message "you are viewing another player named {other player's name}." is displayed.
1c. If you're spying on another actor that isn't a player, then the message "you are viewing an actor with the name {actor's name}." is displayed.
2. If you want to change your view to a non-player actor to test 1c, then you can puke the script "ChangeCamera" while an actor is underneath your crosshair. If successful, your view will change complemented by the message "ChangeCamera: found actor with the name {actor's name}." Otherwise, you get the message "ChangeCamera: couldn't find actor." |
|
|
|
using ZandroDev3.2-221030-0316windows-x86_64 with the example wad on windows and euroboros linux servers
1a 1b and 1c all work as a spectator at first, but after joining the game the text in the middle of the screen is permanently stuck as "you are viewing yourself" for that client even if going back to a spectator, but can be fixed by reconnecting |
|
|
(0022517)
|
Kaminsky
|
2022-12-01 18:07
(edited on: 2022-12-01 18:08) |
|
I uploaded an updated example WAD that should fix the problem you mentioned. The original script would terminate when the client joined from spectators.
|
|
|
|
the updated example wad did the trick, things seem peachy now, ty |
|
|
|
Thanks for checking again, I'll mark this ticket as resolved. |
|