![]() ![]() This eliminates the casts used otherwise, and also allows you to swap out the static_cast with a dynamic_cast to help find incorrect casts. I've also added helpers to make it easier to do type conversions:Īuto pPlayer = GET_PRIVATE( pItem->pev->owner ) Īuto pOtherPlayer = CBaseEntity::Instance( tr.pHit ) (Not all of the constants have been defined yet) How do you spawn grunts with weapons 8 Ending.Spoiler 7 Does anybody. It's also type safe if you need a specific class:įor( auto pFlag : UTIL_FindEntitiesB圜lassname( "item_ctfflag" ) ) It's basically the same as before, but it's easier to use and you can't screw up the logic, like off by one errors in player iteration or a forgotten null check. 0824 - added triggerplayerfreeze and gene worm // 0820 - added displacer. It keeps things cleaner and adds type checking, though it does have some drawbacks.įor( auto pEquip : UTIL_FindEntitiesB圜lassname( "game_player_equip" ) ) Half-Life OPPOSING FORCE game definition file (.fgd) // based on version 1.52. I'm also using enum class, as you can see here. If( pPlayer->m_iTeamNum != CTFTeam::None ) At the portal, Shephard discovers a gene worm, a massive creature. ![]() For example, iterating over players is done like this: Half-Life: Opposing Force is an expansion pack for the first-person shooter game. I'm not doing a 1:1 reconstruction, there are places where i'm making use of newer language features and simpler code to make things easier. When the time comes i'll port it to SharpLife, integrating all of the features so that you can play Opposing Force as well as Half-Life using the same base game, and use any features present in either in your maps. You won't be able to copy paste it into your own mod unfortunately since it changes existing SDK code (some network messages are different, gamerules are different too). The ultimate goal is to make an SDK that completely implements Opposing Force. /rebates/2fgene-worm2f3005-177552fenemies2f&252fgene-worm252f3005-17755252fenemies252f26tc3dbing-&idgiantbomb&nameGiant+Bomb&ra2. After killing the Gene Worm which releases the creatures of Xen upon Earth. Implementation is based on what's needed to make single maps work, starting with the training maps, then the campaign, then multiplayer. Opposing Force was an expansion to the famed Half-Life PC that put the player. I'm going to start with the NPCs now, since that's the interesting part and because that's what the largest part is. Other gamerules need to be updated, and the co-op gamerules need to be implemented as well. So far i've implemented CTF gamerules, which is about 2000 lines of code. I decided to do this now because i know that it will be a while before i can get to this if i make it part of SharpLife, and since i have to reconstruct the original C++ code anyway before i can convert it i figured i'd get it done now, so people can use it and find any mistakes/bugs before it gets converted. I'm currently working to implement Opposing Force in the Half-Life updated SDK:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |