Skip to content

Deal with func_illusionary #29

@stefanhendriks

Description

@stefanhendriks

Related to #28

So this is what I know:

The fences are func_illusionary:
image

And in code dll.cpp around Spawn_Post there is already a piece of code that unsets some flag. However, that deals with windows. Ie, everything with a render mode: kRenderTransTexture.

However, the func_illusionary are actually drawn with rendermode kRenderTransAlpha.

Now, having tested this by adding the following:

        (pent->v.rendermode == kRenderTransAlpha && strcmp("func_illusionary", STRING(pent->v.classname)) == 0)) { // func_illusionary on cs_italy uses this rendermode

to the if statement and then nothing, makes them still undetectable by a trace_hull or trace_line. But.. when I add this:

        pent->v.solid = SOLID_BSP;
        pent->v.movetype = MOVETYPE_PUSHSTEP; // this seemed to be the best choice, does not do much

the trace_hull and trace_line do find them. Which is nice and good. But when applying this to the level, there is strange behaviour:

image

the leafs are also func_illusionary and they become solid and at the floor. Hence you can't walk through them making that path unplayable.

Also, this would probably make cs_747 unplayable as well because it would make the curtains solid. So that won't be an option for #28 :/

So what other options are there?

This is just a brain fart:

  • perhaps we can remember which entities we have altered, do some tracelines at the beginning to determine if node connections (neighbours) are blocked by anfunc_illusionary, then remove the changes again and we have some metadata?
  • another way would be to not change anything, but enhance the 'trace' detections? Perhaps we can add the entities ourselves to some kind of function? Ie. remember the coordinates and create our own version of trace_line where it only detects func_illusionary things? Not sure how to do that
  • yet another way , a more crude but feasable approach, is when bots get stuck (which they evaluate every 0.1 sec anyway) the bots check in sphere if a func_illusionary is blocking them to judge if they should jump. That will solve the movement for cs_italy, but it won't solve the curtains in cs_747

Known cases to deal with:

... other cases??

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions