![half life opposing force icon half life opposing force icon](https://media.moddb.com/images/downloads/1/79/78045/opfor.jpg)
Trip mines are used in a puzzle sequence in the chapter Surface Tension, where Gordon has to go through an old ordinance storage facility filled with explosives. They can be then acquired by the player at the end of the chapter Blast Pit, as well as in a small supply cache along with Satchel Charges and the. In Half-Life, Laser Trip Mines can first be seen deployed by the HECU in the chapter "We've Got Hostiles".It is also possible to jump on the mine itself, without setting it off. The player can also choose to avoid the Laser Trip Mines by crawling or jumping over them. It is recommended to shoot them from safe distance. The player can utilize any weapon to clear the mines out, except for the Crowbar or other melee weapons as this will will result in explosion and immediate death. The Laser Trip Mine can be used to trick any enemies that will chase the player, for example the highly armored Alien Grunts or the agile Black Ops assassins they can also be put to a great use in the multiplayer mode of the game. Trip mines can also be detonated by shooting them.Ī trip mine cannot be placed on a moving surface doing so will cause the device to drop. Then, if an enemy crosses the beam, the device will explode. When a trip mine is placed on the wall, it will give off a three-second long rising sound, signifying that the laser is warming up. To place a trip mine, the player must get close to a surface and aim the crosshair where he or she wants it to be deployed. If the beam is interrupted, the mine detonates in an explosion as powerful as a Satchel Charge. 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.These trip mines can be attached to static surfaces, and project a light-blue laser beam acting as a tripwire they can be thought of as "Laser-Activated Claymore Mines". 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) 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. It keeps things cleaner and adds type checking, though it does have some drawbacks.įor( auto pEquip : UTIL_FindEntitiesB圜lassname( "game_player_equip" ) ) I'm also using enum class, as you can see here. If( pPlayer->m_iTeamNum != CTFTeam::None ) For example, iterating over players is done like this:
#Half life opposing force icon code#
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.
#Half life opposing force icon mod#
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. Implementation is based on what's needed to make single maps work, starting with the training maps, then the campaign, then multiplayer. 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: