Coder Social home page Coder Social logo

ISSTUCK about source-x HOT 15 OPEN

Steinny avatar Steinny commented on June 20, 2024
ISSTUCK

from source-x.

Comments (15)

Steinny avatar Steinny commented on June 20, 2024 1

and only underground withour ARGN!! - shows 1

Screenshot_1

Screenshot_2

from source-x.

Jhobean avatar Jhobean commented on June 20, 2024

@Steinny i use it in my script.

Move a NPC where there no map(black zone) it will return 1.

Place boulder rock around. Shoule work too.

How do you test it?

from source-x.

Jhobean avatar Jhobean commented on June 20, 2024

Seem to only check static item.... Spawn NPC on a mountain and it work.
Maybe we should evaluate added in game item...

from source-x.

Steinny avatar Steinny commented on June 20, 2024

is the castle wall not static enough?

from source-x.

Jhobean avatar Jhobean commented on June 20, 2024

ON a quick check, server only evaluate if player can move... Static and in game intem shoud change nothing

bool CChar::IsStuck(bool fFreezeCheck)
{
    CPointMap pt = GetTopPoint();
    if ( fFreezeCheck && OnFreezeCheck() )
        return true;
    return !( CanMoveWalkTo(pt, true, true, DIR_N) || CanMoveWalkTo(pt, true, true, DIR_E) || CanMoveWalkTo(pt, true, true, DIR_S) || CanMoveWalkTo(pt, true, true, DIR_W) );
}

from source-x.

Steinny avatar Steinny commented on June 20, 2024

as I see it without arguments

from source-x.

Steinny avatar Steinny commented on June 20, 2024

ISSTUCK R Returns 1 if the character cannot walk in any direction.

this is not how this function works
it checks for a specific!!!! tile where you stay on passability!!!

from source-x.

Jhobean avatar Jhobean commented on June 20, 2024

this is not how this function works it checks for a specific!!!! tile where you stay on passability!!!

Don't mad, what you propose? For me it's clear. When you char cannot move in any direction it return 1.

Apparently canmovewalkto do not consider some item on the path.

I use it on my custom spawn point. After I spawn a NPC, I check isstuck. If npc is spawned on water or on black area map, it return 1.(So it work correct on specific case)

from source-x.

Steinny avatar Steinny commented on June 20, 2024

the function does not work as described
Screenshot_1

from source-x.

Steinny avatar Steinny commented on June 20, 2024

my self-written function where I just make the npc run in all directions works better and how it described in wiki ))

from source-x.

xwerswoodx avatar xwerswoodx commented on June 20, 2024

ISSTUCK isn't check the dir you are entering, it only checks if you can move in North, West, South or East, if you can walk any of these direction, it returns 0.

For Underground check, LLama can only not walk to left, so he can move other 3 directions, so yes return 0 is correct.
For the half blocks, they are walkable, so llama can walk on them, so yes he can walk all directions 0 is correct.
While you are in an item/wall/table etc. that blocks you to walk any side, it returns 1.

ISSTUCK means you can't walk any direction. Maybe you thought it shows only if he can walk to any direction but it's not for it. it's CANMOVE dir

image

from source-x.

Steinny avatar Steinny commented on June 20, 2024

ISSTUCK isn't check the dir you are entering, it only checks if you can move in North, West, South or East, if you can walk any of these direction, it returns 0.

but it doesn't even work that way. he checks the passibility of the tile according to my test. look last screen

from source-x.

xwerswoodx avatar xwerswoodx commented on June 20, 2024

ISSTUCK isn't check the dir you are entering, it only checks if you can move in North, West, South or East, if you can walk any of these direction, it returns 0.

but it doesn't even work that way. he checks the passibility of the tile according to my test. look last screen

I am testing it on my sphere, and it works fine for me, it doesn't return 0 when I am in a table, do you have any function named ISSTUCK that overrides default behaviour?

image

from source-x.

Steinny avatar Steinny commented on June 20, 2024

Strange. NO.
I do all my functions like f_function

from source-x.

xwerswoodx avatar xwerswoodx commented on June 20, 2024

Okay, I think I find out the issue, let me check, Okay I will take a note for this issue, I will check it in next pr.

from source-x.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.