[Mutator] Headshot View

Anything about UT2004 mapping, Uscripting & more
Post Reply
User avatar
Wormbo
Posts: 384
Joined: Sun 28. Aug 2011, 12:52
Description: Coding Dude

[Mutator] Headshot View

Post by Wormbo »

Here's a little fun mutator with no gameplay impact whatsoever:
Headshot View brings you the old UT feature of viewing through your player's eyes after dying from a headshot. "Headshot" in this sense not only is a fatal sniper or LG hit to the head, but also getting run over by a Manta. (The damage type is configured that way, there's just no logic to announce the headshot. The Wormbot IRC Reporter also picks it up this way.)

Download Link
User avatar
Pegasus
Posts: 1321
Joined: Wed 4. Nov 2009, 23:37
Description: ONSWordFactory
Location: Greece

Re: [Mutator] Headshot View

Post by Pegasus »

Oooh, new Wormbo code! *tucks napkin inside shirt collar*

Yes, I know I'm 3 days late, shuddup.


Btw, couldn't tell offhand from GibHeadCamera's replicated vars&props, but does it work for spectators too or just the victim xPawn? Also, is it a common practice to call PostBeginPlay from inside PostNetBeginPlay? First time I've run across such sorcery :o.


So, any other projects cooking these days, Wormbo? For this game, I mean. (Gotta remember to add this qualifier from now on, I guess, what with UT4 n' all)
Eyes in the skies.
Image
User avatar
Wormbo
Posts: 384
Joined: Sun 28. Aug 2011, 12:52
Description: Coding Dude

Re: [Mutator] Headshot View

Post by Wormbo »

GibHeadCamera extends a class that doesn't consider replication and thus does some work in PostBeginPlay that a replicated class would only do in PostNetBeginPlay. (As you can see, I overrode PostBeginPlay to no do anything when called directly.) I was lazy, so it only works for the player, not any spectator. If there's any demand, I can try upgrading the code accordingly.

I don't have access to the UT4 sources yet (no credit card, so I didn't have a way to pay so far), but then again, there are still a few UT2004 projects (e.g. Badgers) and UT3 Jailbreak to work on. Not that I actually do much coding work...
Post Reply