Git Product home page Git Product logo

Comments (4)

j0zzz avatar j0zzz commented on September 22, 2024

An svc_cutscene is sent. The client sets cl.intermission = 3 when this server message is received.
There is a special classname 'effect_finale' in hipend.bsp for which custom handling is implemented in the hipnotic progs.dat. svc_cutsecene can occur in other maps too so it doesn't necessary mean the level ends, so cutscenes on these maps must be handled exceptionally.

from joequake.

j0zzz avatar j0zzz commented on September 22, 2024

e.g. the cutscene block from hipend looks like the following:

block {
 camera 9.84375000 135.000000 0.000000000;
 updateentity {
  entity 1;
  origin_x 1028.00000;
  origin_y -28.0000000;
  origin_z 356.000000;
 }
 updateentity {
  entity 154;
  origin_x 992.000000;
  origin_y -184.000000;
  origin_z 208.000000;
 }
 cutscene "";
}

There are updateentity messages before the cutscene message which means we cannot return DP_CBR_SKIP_PACKET for update messages, otherwise we miss the cutscene as well. But I believe this isn't a problem since we only read out data for the player, otherwise just skip the actual update message. Based on this code:

    if (entity_num != pctx->view_entity) {
        return DP_CBR_CONTINUE;
    }

Am I correct @matthewearl ?
If yes, then the fix is easy, although we need to filter by map name explicitly, since cutscene messages do may appear in the middle of demos too :/

from joequake.

matthewearl avatar matthewearl commented on September 22, 2024

Hello, unfortunately the packet that continues the cutscene message also includes a player update (entity 1), or at least it does for the hipend ER hend_017. As you mention, as soon as we hit that update we'll skip to the next packet missing the cut scene message.

The idea behind skipping to the end of the packet is an optimization so we don't waste time parsing messages if there's nothing else of interest in the packet. It's useful for enormous demos like ad_sepulcher where each packet typically starts with a entity 1 update, followed by thousands of irrelevant (for the ghost's purposes) updates.

If we need map-specific logic anyway we can just disable this optimization for maps like hipend where timing should stop on a cut scene. I doubt losing the optimization will make a noticeable difference for small maps like hipend, so long as there aren't any huge AD-style maps with cutscene finishes we should be OK.

from joequake.

j0zzz avatar j0zzz commented on September 22, 2024

Fixed in commit d59b6a1

I kept the updatemessage optimization. Only going through all the the update messages if a relevant, 'cutscene-like' map is the loaded one. Regarding such maps, I have 4.7 gigs (~450 textual dem files) in my recamming folder, on which I started a search for cutscene and no results were found. Even on maps like ej3_colossus or parallax where visible cutscene-like scripted camera sequences occur, this is implemented via svc_setangle. Anyways, we can add more maps to this list in the future.

from joequake.

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.