Announcement

Collapse
No announcement yet.

Quakespasm improved collision detection code is now available

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Quakespasm improved collision detection code is now available

    Link to my fumc_msgboard post:
    https://www.celephais.net/board/view...d.php?id=62183

    COPYPASTA
    Finally got off my lazy ass and created a git repo.

    The quakespasm code is here
    https://github.com/frabbani/quakespasm/tree/collision

    The quakec code is here
    https://github.com/frabbani/quakec/tree/collision

    quakespasm source - added PF_trace_entity hook in pr_cmds.c which does a brute force ray triangle intersect test against the actual geometry. (see collision.h. mathlib.h and void Mod_LoadAliasCollision in gl_model.c )

    quakec - added TraceEntities in trace.qc which uses trace_entity hook. FireBullets uses this call to perform proper collision tests. As such, the main difference you will notice is the shotgun takes more shots than usual to kill enemies (and will sometimes miss them entirely).


    I have an MSYS2 build working on my computer with the necessary dlls that I haven't added to my repo. For those of you who can build quakespasm, maybe you can benefit from my code.

    NOTE: the code is unoptimized.
Working...
X