MantisBT - Zandronum
View Issue Details
0003184Zandronum[All Projects] Bugpublic2017-07-12 07:182017-07-13 18:57
eagle 
 
normalminoralways
closedinvalid 
WindowsWindows Server 2012 R2
3.0-beta 
 
0003184: ClassifyActor - not work in online
this script has to delete any actor except the player, but often it turns out differently.

script "Hem_RemoveThingImmediatelly" (void)
{
    if(ClassifyActor(0) & ACTOR_PLAYER)
    {
        delay(1);
        terminate;
    }
    int target = ActivatorTID();
    if ((target == 0) && (!(ClassifyActor(target) & ACTOR_PLAYER)))
    {
        target = UniqueTID();
        Thing_ChangeTID(0,target);
    }
    if ((!(ClassifyActor(target) & ACTOR_PLAYER)) && (ClassifyActor(target) != ACTOR_NONE))
    {
        Thing_Remove(target);
        terminate;
    }
    terminate;
}
No tags attached.
? ClassifyActorTest.wad (11,805) 2017-07-12 09:46
/tracker/file_download.php?file_id=2143&type=bug
Issue History
2017-07-12 07:18eagleNew Issue
2017-07-12 08:09DuskNote Added: 0018007
2017-07-12 08:09DuskStatusnew => closed
2017-07-12 08:09DuskResolutionopen => invalid
2017-07-12 08:10DuskNote Edited: 0018007bug_revision_view_page.php?bugnote_id=18007#r10756
2017-07-12 08:29eagleNote Added: 0018008
2017-07-12 08:29eagleStatusclosed => feedback
2017-07-12 08:29eagleResolutioninvalid => reopened
2017-07-12 09:06eagleNote Added: 0018009
2017-07-12 09:06eagleStatusfeedback => new
2017-07-12 09:40TheMisterCatNote Added: 0018010
2017-07-12 09:43DuskNote Added: 0018011
2017-07-12 09:45DuskStatusnew => closed
2017-07-12 09:45DuskResolutionreopened => invalid
2017-07-12 09:46DuskFile Added: ClassifyActorTest.wad
2017-07-12 09:47eagleNote Added: 0018012
2017-07-12 09:47eagleStatusclosed => feedback
2017-07-12 09:47eagleResolutioninvalid => reopened
2017-07-12 09:50KondaNote Added: 0018013
2017-07-12 09:53TheMisterCatNote Added: 0018014
2017-07-12 10:04eagleNote Added: 0018015
2017-07-12 10:04eagleStatusfeedback => new
2017-07-12 10:05eagleNote Edited: 0018015bug_revision_view_page.php?bugnote_id=18015#r10758
2017-07-12 15:18Ru5tK1ngNote Added: 0018016
2017-07-12 15:18Ru5tK1ngStatusnew => closed
2017-07-12 16:08DuskResolutionreopened => invalid
2017-07-12 17:23eagleNote Added: 0018017
2017-07-12 17:23eagleStatusclosed => feedback
2017-07-12 17:23eagleResolutioninvalid => reopened
2017-07-12 17:53jdagenetNote Added: 0018018
2017-07-13 13:59KorshunNote Added: 0018019
2017-07-13 14:17KorshunNote Added: 0018020
2017-07-13 14:19KorshunNote Edited: 0018020bug_revision_view_page.php?bugnote_id=18020#r10760
2017-07-13 14:47DuskNote Added: 0018021
2017-07-13 14:47DuskStatusfeedback => closed
2017-07-13 14:47DuskResolutionreopened => invalid
2017-07-13 18:57DuskNote Edited: 0018021bug_revision_view_page.php?bugnote_id=18021#r10762

Notes
(0018007)
Dusk   
2017-07-12 08:09   
(edited on: 2017-07-12 08:10)
Your code is just plain wrong. Use something like this instead:

script "Hem_RemoveThingImmediatelly" (void)
{
    if (PlayerNumber() == -1)
        Thing_Remove(0);
}


(0018008)
eagle   
2017-07-12 08:29   
Alas, your code will also delete everything, including the player's actor.
(0018009)
eagle   
2017-07-12 09:06   
and with it how to be? Nevertheless ClassifyActor(0) works not correctly in online.

script "Hem_RemoveItemDelayed" (void)
{
    if((ClassifyActor(0) & ACTOR_PLAYER) || (ClassifyActor(0) & ACTOR_MONSTER))
    {
        delay(1);
        terminate;
    }
    int target = ActivatorTID();
    if ((target == 0) && (!(ClassifyActor(target) & ACTOR_PLAYER)))
    {
        target = UniqueTID();
        Thing_ChangeTID(0,target);
    }
    int counter = 0;
    while ((counter < 3150) && (ClassifyActor(target) != ACTOR_NONE) && (!(ClassifyActor(target) & ACTOR_MONSTER)))//delay 15 min
    {
        delay(10);
        counter++;
    }
    if ((!(ClassifyActor(target) & ACTOR_PLAYER)) && (ClassifyActor(target) != ACTOR_NONE) && (!(ClassifyActor(target) & ACTOR_MONSTER)))
    {
        StopSound(target,CHAN_WEAPON);
        StopSound(target,CHAN_VOICE);
        StopSound(target,CHAN_ITEM);
        StopSound(target,CHAN_BODY);
        StopSound(target,5);
        StopSound(target,6);
        StopSound(target,7);
        Thing_Remove(target);
        terminate;
    }
    terminate;
}
(0018010)
TheMisterCat   
2017-07-12 09:40   
'https://www.dropbox.com/s/8rb7lh1oah6g9g8/ClassifyActorTest.wad?dl=0 [^]'

The problem is not classifyactor, it works fine multiplayer, as this demonstration wad shows. Your script is just wrong. Don't make bug reports without confirming the bugs please.
(0018011)
Dusk   
2017-07-12 09:43   
And my script won't delete the player because PlayerNumber() returns -1 if it's not a player.
(0018012)
eagle   
2017-07-12 09:47   
What isn't correct? Everything is made according to descriptions from zdoom.org
Despite all checks the script begins to carry out removal of the actor with TID of the actor of the player.
It is tested within many hours of a game in online.
(0018013)
Konda   
2017-07-12 09:50   
eagle, please try Dusk's version of the script. If it still doesn't work (after you've actually tried to run the mod with Dusk's script), explain from where, when, and how you are calling this script.
(0018014)
TheMisterCat   
2017-07-12 09:53   
Do NOT reopen this report. The problem is NOT classifyactor, it works as intended.
(0018015)
eagle   
2017-07-12 10:04   
(edited on: 2017-07-12 10:05)
Inscribed the offered Dusk in scripts, but it isn't enough as it seems to me as loss by the player of a body and other unclear actuatings sometimes nevertheless happen. In several hours I will be able to check it in online on the real server.

(0018016)
Ru5tK1ng   
2017-07-12 15:18   
I don't particularly care if it works or not because the tracker isn't for help and support.

Please use the forums: 'http://zandronum.com/forum/viewforum.php?f=39 [^]'

There are plenty of people who can help you with your ACS.
(0018017)
eagle   
2017-07-12 17:23   
Я проверил предложенное Dusk на сервере в реаьной игре, не работает это, не определяет игрока.

I checked the offered Dusk on the server in a reany game, it does not work, does not define the player.
(0018018)
jdagenet   
2017-07-12 17:53   
Not sure why this was reopened, ClassifyActor does what it's intended to do. The issue here is what he's trying to do with it that isn't working, which like Rust said, belongs on the forums -- not here.
(0018019)
Korshun   
2017-07-13 13:59   
>Я проверил предложенное Dusk на сервере в реаьной игре, не работает это, не определяет игрока.

Translation: I tested the solution that Dusk suggested on a server in a real game, it doesn't work, doesn't determine the player.
(0018020)
Korshun   
2017-07-13 14:17   
(edited on: 2017-07-13 14:19)
Автор, иди спроси на форуме или у друзей, как написать нормальный работающий скрипт. Я тестил ClassifyActor в мультиплеере и он нормально работает. Твои скрипты переусложнены и местами бред.

Translation:
Author, go ask your friends or on the forums how to make a working script. I tested ClassifyActor in multiplayer and it works fine. Your scripts are overcomplicated and sometimes nonsense.

(0018021)
Dusk   
2017-07-13 14:47   
(edited on: 2017-07-13 18:57)
Okay this has gone on for long enough. There is clearly no bug here but the provided script is just broken.

As has been said before already, please use the forums for editing issues. This is not a bug and therefore does not belong to the tracker.

Do NOT open this ticket again or I will consider deleting it. If you find an actual bug with ClassifyActor (as unlikely as that is), please post a new ticket.