Wolf3d Haven Forum

Please log in or register. Smile
Wolf3d Haven Forum

A friendly Wolfenstein 3D community, about Wolfenstein 3D, the game that gave birth to first person shooters...


    no score from cheating

    Share

    Dark_wizzie
    I am Death Incarnate!
    I am Death Incarnate!

    Male
    Number of posts : 5090
    Age : 22
    Location : USA or Tawain
    Job : Student, Part time Cactuar fanatic
    Hobbie : Planting Cactuars.
    Message : I made this forum when I was 13 High on Drugs
    Registration date : 2007-03-24

    no score from cheating

    Post by Dark_wizzie on Sun Apr 29, 2007 1:43 pm

    dome




    Code Editing Tutorials
    How to make player get NO score when cheating!





    Doing this doesn't give you a score if you use Debug Keys. Like in Totengraber 2.



    Step 1:

    Open WL_DEF.H and add this somewhere:


    extern int DebugOk;


    Step 2:

    Open WL_AGENT.C and do a search for "Give Points"(no quotes!) you should see something like this:



    /*

    =============

    =

    =Give Points

    =

    =============

    */



    void GivePoints (long points)

    {

    gamestate.score += points;

    while (gamestate.score >= gamestate.nextextra)

    {

    gamestate.nextextra += EXTRAPOINTS;

    GiveExtraMan ();

    }

    DrawScore ();

    }




    Step 3: Change it to: (DON'T forget to add the "}" (no quotes) after "DrawScore ();" !


    =============

    =

    =Give Points

    =

    =============

    */



    void GivePoints (long points)

    {

    if (!DebugOk)

    {

    gamestate.score += points;

    while (gamestate.score >= gamestate.nextextra)

    {

    gamestate.nextextra += EXTRAPOINTS;

    GiveExtraMan ();

    }

    DrawScore ();

    }

    }



    Compile and Link up!

    Now when you use debug keys you get no score and the player can't get a score!





    Wolf3d Haven
    Minute Logic Blog

      Current date/time is Sat Dec 10, 2016 12:20 pm