Jump to content

Revive.gm Version 0.92


Recommended Posts

Hello everyone,

 

I had several nq servers in the early days
Just made a new server, everything works fine besides Omnibot 
It seems that after Omnibot 0.83 bot reviving doesnt work for NQ specifically.

The changelog says: 

=== GOALS === (for 0.84)
    Disabled waiting for medic in NoQuarter mod because of weapon spread bug
  

I tried fixing that, within 0.92
Seems like its relying on the revive.gm.

I also wrote a new revive.goal with extra functions, those run flawless on 0.83

——-

this.GoalType = "REVIVE";
this.Version = 1;
this.DefaultPriority = 1.0;
this.DontSave = true;
this.Radius = 64;
this.DynamicPosition = true;
this.DynamicOrientation = true;
this.Range = 1500; 

//////////////////////////////////////////////////

this.UpgradeVersion = function(Props)
{
    // version 0 is string,string key/values from the old waypoint format
    if(Props.Version==0)
    {
        // Version 1 Schema, upgrade from waypoint format
        Props.Version = 1;
    }
    else if(Props.Version == this.Version)
    {
    
        this.DisableGoal(true);

        injured ents is bad
        this.EntPosition = GetEntPosition(this.GetEntity());


        tr = TraceLine( this.EntPosition, Vec3(this.EntPosition.x, this.EntPosition.y, this.EntPosition.z-90), 0, TRACE.SOLID, -1, true );
        if(tr.surface & SURFACE.SLICK){
            this.SetRemoveFlag(false);
        }
    }
};

//////////////////////////////////////////////////////////////////////////

this.Update = function()
{
    sleep(1)
    goalEnt = this.GetEntity();

    if (!GetEntFlags(goalEnt, ENTFLAG.DEAD) && Util.GetEntHealth(goalEnt) > 1
        || GetEntFlags(goalEnt, ENTFLAG.LIMBO) )
    {
        this.SetAvailable(1, true);
        this.SetRemoveFlag(false);
    }
    else if(this.IsDisabled())
    {
        entPos = GetEntPosition(goalEnt);
        if (entPos){
            if (DistanceBetween(this.EntPosition,entPos) < 2)
            {
                this.DisableGoal(false);
            
            }
            else
            {
                this.EntPosition = entPos;
            }
        }
    }
};

function OnDeath() {
    b.SetTapOutTime(0);
    b.SetStateEnabled("Death", false);
    b.SetStateEnabled("BleedOut", true);
}

state BleedOutState
{
    OnEnter = function(bot)
    {
        
        bot.SetBusy(true);       
        bot.SetMovement(0);       
        bot.SendVoiceMacro("Medic!");

      
        bot.SetTimeout(20000, function() {
            bot.TapOut();
        });
    };

    OnUpdate = function(bot, dt) {
    };

    OnExit = function(bot) {
        bot.SetBusy(false);
    }
}

bot.SetState("Death", "DeathState");

    }
}

—————————————————

For me it seems like there is something hard coded which doesn’t allow functions to run properly.

 

I hope you guys can help me.

 

Greetings  

Link to comment
Share on other sites

  • Moderators

If you revive a bot in NQ, then all his bullets are bent 90 degrees. The revived bot can only shoot himself in the foot or kill teammates who are standing next to him. Do you really want team killers on your server ?

I would recommend to use legacy mod which is newer with more features and less bugs.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...