Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Game Over and Death Cam #25

Closed
revolucas opened this issue May 21, 2015 · 3 comments
Closed

Game Over and Death Cam #25

revolucas opened this issue May 21, 2015 · 3 comments

Comments

@revolucas
Copy link
Collaborator

Is anyone else having an issue with the game_over tutorial not triggering on death since the commit where FP_DEATH define was added?

@avoitishin
Copy link
Owner

Is that what you have in Actor.cpp?

if (IsGameTypeSingle())
    {
#ifdef FP_DEATH
        cam_Set(eacFirstEye);
#else
        cam_Set(eacFreeLook);
#endif // FP_DEATH
        CurrentGameUI()->HideShownDialogs();

        /* avo: attempt to set camera on timer */
        /*CTimer T;
        T.Start();
        if (!SwitchToThread())
        Sleep(2);
        while (true)
        {
        if (T.GetElapsed_sec() == 5)
        {
        cam_Set(eacFreeLook);
        start_tutorial("game_over");
        break;
        }
        }*/
        /* avo: end */

        start_tutorial("game_over");
    }

@revolucas
Copy link
Collaborator Author

Yes, that is what I have in Actor.cpp. The reason I'm asking this question is because I tried my compiled binaries on untouched CoP with no gamedata (except gulag_general.script changes) and do not see the game over screen there either. It seems to be the cause of the build and I'm confused as to why because Actor.cpp looks fine. Could this not be triggering at all because of the fake death mechanics you added? Because in Freelook cam (FP_DEATH undefined) I noticed there is no actor corpse.

EDIT: Nevermind, I didn't realize that that killing actor in on_actor_before_death is now mandatory if you want to see the real game_over screen. The information about killing the actor in this callback needs updated. There is a typo. level:object_by_id should be level.object_by_id and the example is killing the killer instead of the actor. This is what the example should look like:

db.actor:kill(db.actor, true)

@avoitishin
Copy link
Owner

Does it really matter who kills an actor? Example is just a simple showcase on how to do it. BTW - i think sent you PM some time ago on COC forums about this :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants