Firing the shotgun causes significant delay

Issue #74 resolved
Carsten Fuchs created an issue

Original report and discussion is at http://www.cafu.de/forum/viewtopic.php?f=6&t=873

Isolating the source of the delay is required as a first step. Is tracing rays through terrains slow??

Comments (2)

  1. Former user Account Deleted
    • assigned issue to
    • changed status to resolved

    In [changeset:"2f83e6df776df2a6f2abb31e74665c22b4238c2b/git"]: {{{

    !CommitTicketReference repository="git" revision="2f83e6df776df2a6f2abb31e74665c22b4238c2b"

    GameSys: Update ComponentHumanPlayerT::TraceCameraRay() to operate in the clip world, not the physics world.

    The physics world instance on the client is problematic: Whereas physics objects on the server are instantiated as "dynamic" physics objects, on the client they actually had to be instantiated as "kinematic", but at this time aren't. See ComponentPhysicsT::UpdateDependencies() for details.

    As a result, physics objects on the client are, at this time, never properly updated, so that the previous implementation of TraceCameraRay() could not properly work. For example, firing with the AR rifle at the crate in map Kidney found particles at the wrong positions once the crate had moved from its original position.

    (In fact, we should probably not instantiate a physics world instance on the client in the first place! Except possibly for eye-candy effects, it's quite useless there. TODO!)

    The new implementation works with the clip world, which is properly updated on the client and thus yields the expected results.

    Also, performance turns out to be much better with the new implementation, so that this change in fact fixes #74. }}}

  2. Log in to comment