mirror of
https://github.com/ENSL/NS.git
synced 2025-03-22 10:21:40 +00:00
ns v3.2.1a
This commit is contained in:
parent
87965d1fb2
commit
1c552d08fb
81 changed files with 652 additions and 31072 deletions
118
README.md
118
README.md
|
@ -1,40 +1,104 @@
|
|||
Natural Selection LINUX Build
|
||||
============================================
|
||||
# Natural Selection v3.2.1a
|
||||
This is a complete rebuild of the game [Natural Selection] for Windows and Linux. After the SteamPipe update the game remained in an pretty bad state for years, therefore I decided to recompile its sources which are provided by [Unknownworlds Entertainment]. With this update this might be the first half-life mod which achieves multi-platform support. Speaking of this you are encouraged to compile for Mac OS X. The ultimate goal is to provide a better expierence of the Natural Selection gameplay on all major platforms and a possible distribution in the future through [Steam].
|
||||
|
||||
Just hacked up, you will notice a lot of odd behavior.
|
||||
### Downloads
|
||||
Here you find the new compiled `.dlls` or `.so` files for client and server. If you just want to play or to host a server you can download them here:
|
||||
- [ns_patch_v321a.7z]
|
||||
|
||||
In order to compile: `cd main/source/linux` and type `make hl_cdll &> out.log` with g++-multilib and the following additional libraries:
|
||||
- zlib1g-dev:i386
|
||||
- libpng12-dev:i386
|
||||
- libc6-dev:i386
|
||||
Remember to extract them to your Half-Life/ns directory.
|
||||
|
||||
installed.
|
||||
The offical download url for the complete version ns v3.2 is not working with firefox. Either use:
|
||||
```sh
|
||||
$ wget http://www.unknownworlds.com/files/ns/ns_install_v32.exe
|
||||
```
|
||||
or
|
||||
```sh
|
||||
$ curl -LO http://www.unknownworlds.com/files/ns/ns_install_v32.exe
|
||||
```
|
||||
or follow this link http://sllegacy.unknownworlds.com/files/ns/ns_install_v32.exe
|
||||
### Changes
|
||||
In order to make this game work for linux the old half-life engine files were replaced with the newer ones. In addtion some changes are accounted for the use of an acient glibc library. Some changes to the game itself have been made and these include:
|
||||
- The ChatPanel has been replaced in favor of the old hl chat.
|
||||
- The observatory has now a spherical detection like the sensory chamber
|
||||
- Removed special NS gamma since it is windows only
|
||||
|
||||
- The particle engine (David McAllister)
|
||||
The plan is to bring the chat and the gamma back when a cross-platfrom solution can be achieved.
|
||||
|
||||
If you get the this error when running the app: Fatal Error - could not load library (client.so),
|
||||
With a high chance it is because of some UNDEFINED SYMBOLS in the shared library.
|
||||
But you can check this with `ldd -r -d client.so`.
|
||||
### Bugs
|
||||
With great changes come great bugs.
|
||||
- Chat input is not visible while spectating
|
||||
- [sg reload bug]
|
||||
- [FPS_Effects] FPS dependant fire rates and player physics
|
||||
- gorge's view rotates when he drops a structure from the popup menu?
|
||||
- The background of text in the menu or in popups does not look nice possible realted to the `special ns gamma`.
|
||||
- Flashing available alien upgrade icons (defense, movement and sensory) tend to disappear when a player dies and respawns. The icons won't appear until the alien chooses an upgrade.
|
||||
- func_train and func_tracktrain entities don't reset to their original positions when a round has ended
|
||||
- windows server works only with the hlds tool
|
||||
|
||||
If you find more please report them!
|
||||
### Compile
|
||||
|
||||
First you will need to get the files:
|
||||
```sh
|
||||
$ git clone https://github.com/fmoraw/NS.git
|
||||
```
|
||||
|
||||
Then goto `NS/main/source/linux` and use `make hl_cll` for the client and `make ns` for the server.
|
||||
|
||||
Make sure you have `g++-multilib` set up for x64 operating systems. For windows compilation should be working if you have VS2010 installed.
|
||||
|
||||
If you get the this error when running the app: `Fatal Error - could not load library (client.so)`, With a high chance it is because of some `UNDEFINED SYMBOLS` in the shared library. But you can check this with this command:
|
||||
``` sh
|
||||
$ ldd -r -d client.so
|
||||
```
|
||||
|
||||
If you want to debug:
|
||||
- `LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH" gdb ./hl_linux`
|
||||
- `r -game ns -dev -steam`
|
||||
```sh
|
||||
$ LD_LIBRARY_PATH=".:$LD_LIBRARY_PATH" gdb ./hl_linux r -game ns -dev -steam
|
||||
```
|
||||
Due to the new engine and the nature of Linux I had to make a lot of changes! You can find them with grep -Ril `@Linux`.
|
||||
|
||||
### Hosting a server
|
||||
Since servers are really rare at this point in time here is a tutorial how to set up an [Natural Selection] server with [hlds].
|
||||
|
||||
1. Follow these steps: https://developer.valvesoftware.com/wiki/SteamCMD
|
||||
2. Copy the [Natural Selection] directory to steamcmd/servers/
|
||||
3. Run the game :
|
||||
```sh
|
||||
$ ./hlds_run -game ns -autoupdate +map ns_eclipse + sv_secure 1 + port 27015 + ip 127.0.0.1 +hostname "Natural Selection" +maxplayers 32
|
||||
```
|
||||
|
||||
If you are behind a NAT(Router) make sure to open at least those ports:
|
||||
- 27015 UDP (game transmission, pings)
|
||||
- 26900 UDP (VAC service) -- automatically increments if used in case of additional server processes
|
||||
|
||||
`Under no circumstances expose your host to the internet!!!` For more information follow [this link](https://developer.valvesoftware.com/wiki/Half-Life_Dedicated_Server).
|
||||
|
||||
In order to check if you server is connected to the steam servers copy the following url in your browser and replace `<your IP address>` with your external ip:
|
||||
`http://api.steampowered.com/ISteamApps/GetServersAtAddress/v0001?addr=<your IP address>&format=json`
|
||||
|
||||
There is an updated version of metamod called [metamodp](http://metamod-p.sourceforge.net/). Since players are also pretty rare you might want to install [rcbot] and therefore you have to download those files:
|
||||
- [rcbot without dlls](http://filebase.bots-united.com/index.php?act=download&id=210)
|
||||
- [rcbot linux dlls](http://filebase.bots-united.com/index.php?act=download&id=428)
|
||||
|
||||
### Usefull links
|
||||
* [Usefull collection of ns files server addons, maps and erverything ](http://www.brywright.co.uk/downloads/files/index.php?dir=natural-selection/)
|
||||
* [Great collection of ns guides/tutorials](http://www.naturalns.clanservers.com/forums/index.php?topic=5.0)
|
||||
* [rcbot downloads](http://filebase.bots-united.com/index.php?act=category&id=19)
|
||||
* [dillinger.io markdown editor](http://dillinger.io/)
|
||||
|
||||
[Natural Selection]: <http://unknownworlds.com/ns/>
|
||||
[Unknownworlds Entertainment]:<https://github.com/unknownworlds/NS>
|
||||
[ns_patch_v321a.7z]:<https://github.com/fmoraw/NS/blob/linux/ns_patch_v321a.7z>
|
||||
[FPS_Effects]:<http://wiki.sourceruns.org/wiki/FPS_Effects>
|
||||
[Steam]: <http://store.steampowered.com/about/>
|
||||
[sg reload bug]:<https://github.com/unknownworlds/NS/issues/5>
|
||||
[hlds]:<https://developer.valvesoftware.com/wiki/Half-Life_Dedicated_Server>
|
||||
[rcbot]:<http://filebase.bots-united.com/index.php?act=category&id=19>
|
||||
|
||||
|
||||
Due to the new engine and the nature of Linux I had to make a lot of changes! You can find them with `grep -Ril "@Linux"`.
|
||||
Many thanks to GiGaBiTe.
|
||||
|
||||
List of (new) Bugs
|
||||
|
||||
1. FMOD doesn't load
|
||||
2. play random song needs to be reimplemented for linux
|
||||
3. Commander Overview: Camera needs to be fixed
|
||||
4. Hud: Odd behavior of the displayed models
|
||||
5. Mouse rotation is locked to a specific angle
|
||||
6. NS had some special Gamma functions(many WIN func calls), so I removed them :-) --> Always standard gamma (BUG?)
|
||||
7. Fonts: ns/gfx/vgui/fonts High resolution fonts missing
|
||||
|
||||
|
||||
The server still needs some work (Segmentation fault)! But it can be compiled: `make ns`
|
||||
|
||||
Half Life 1 SDK LICENSE
|
||||
=======================
|
||||
|
|
471
main/Balance.txt
471
main/Balance.txt
|
@ -1,471 +0,0 @@
|
|||
// Automatically generated file. Last created 02/07/05, 23:08:45.
|
||||
|
||||
// Integer data
|
||||
#define kAcidRocketDamage 25
|
||||
#define kAcidRocketRadius 165
|
||||
#define kActiveNodesMessageUpdateTime 0
|
||||
#define kAdvArmoryHealth 4000
|
||||
#define kAlienCelerityBonus 25
|
||||
#define kAlienChamberMaxPlayers 3
|
||||
#define kAlienFlashlightRange 200
|
||||
#define kAlienResourceTowerBuildTime 20
|
||||
#define kAlienResourceTowerCost 15
|
||||
#define kAlienResourceTowerHealth 2500
|
||||
#define kAlienResourceTowerSoundDelayTime 60
|
||||
#define kAlienRespawnPlayerModifier 6
|
||||
#define kAlienRespawnTime 7
|
||||
#define kAmmoCost 1
|
||||
#define kArmorDropRange 300
|
||||
#define kArmorOneResearchCost 20
|
||||
#define kArmorOneResearchTime 60
|
||||
#define kArmorThreeResearchCost 40
|
||||
#define kArmorThreeResearchTime 120
|
||||
#define kArmorTwoResearchCost 30
|
||||
#define kArmorTwoResearchTime 90
|
||||
#define kArmoryBuildDistance 300
|
||||
#define kArmoryBuildTime 15
|
||||
#define kArmoryCost 10
|
||||
#define kArmoryHealth 2400
|
||||
#define kArmoryUpgradeCost 30
|
||||
#define kArmoryUpgradeTime 160
|
||||
#define kArmsLabBuildTime 19
|
||||
#define kArmsLabCost 20
|
||||
#define kArmsLabHealth 2200
|
||||
#define kBalanceAverageTeamSize 6
|
||||
#define kBalanceFuncResourceTime 15
|
||||
#define kBalanceHiveDistance 2500
|
||||
#define kBalanceNodeDistance 1200
|
||||
#define kBalanceNumGorges 1
|
||||
#define kBasePlayerSpeed 150
|
||||
#define kBileBombDamage 200
|
||||
#define kBileBombRadius 200
|
||||
#define kBite2Damage 60
|
||||
#define kBiteDamage 75
|
||||
#define kBiteRange 60
|
||||
#define kBuildingVisibilityRadius 1000
|
||||
#define kCatalystCost 3
|
||||
#define kCatalystDuration 8
|
||||
#define kCatalystResearchCost 20
|
||||
#define kCatalystResearchTime 40
|
||||
#define kChargeDamage 320
|
||||
#define kClawsDamage 90
|
||||
#define kCombatBaseExperience 100
|
||||
#define kCombatBaseRespawnTime 5
|
||||
#define kCombatExperienceBaseAward 60
|
||||
#define kCombatExperienceCrowdAward 10
|
||||
#define kCombatExperienceLevelAward 10
|
||||
#define kCombatFriendlyNearbyRange 500
|
||||
#define kCombatLevelHealthIncrease 0
|
||||
#define kCombatLevelSpeedIncrease 10
|
||||
#define kCombatLevelupArmorIncreasePercent 0
|
||||
#define kCombatLevelupHealthIncreasePercent 0
|
||||
#define kCombatMaxPlayersPerWave 5
|
||||
#define kCombatObjectiveExperienceScalar 600
|
||||
#define kCombatRespawnScalar 9
|
||||
#define kCombatSpawnClips 2
|
||||
#define kCombatThresholdRespawnTime 3
|
||||
#define kCombatThresholdTeamSize 8
|
||||
#define kCombatTimeLimit 300
|
||||
#define kCombatWeaponStayTime 0
|
||||
#define kCommandStationBuildDistance 400
|
||||
#define kCommandStationBuildTime 15
|
||||
#define kCommandStationCost 20
|
||||
#define kCommandStationHealth 10000
|
||||
#define kCommandStationReuseTime 5
|
||||
#define kCommanderPlayerSpeed 4000
|
||||
#define kCustomIconColorLength 3
|
||||
#define kCustomIconNameLength 5
|
||||
#define kDebugAnimations 0
|
||||
#define kDebugServerCaching 1
|
||||
#define kDebugShowEntityLog 1
|
||||
#define kDefenseChamberBuildTime 20
|
||||
#define kDefenseChamberCost 10
|
||||
#define kDefenseChamberHealth 1200
|
||||
#define kDefenseChamberThinkInterval 2
|
||||
#define kDefensiveChamberHealRange 400
|
||||
#define kDefensiveChamberRegenAmount 10
|
||||
#define kDefensiveChamberRegenPercent 1
|
||||
#define kDevourDamage 3
|
||||
#define kDevourRange 100
|
||||
#define kDistressBeaconCost 15
|
||||
#define kDistressBeaconRange 600
|
||||
#define kDistressBeaconTime 3
|
||||
#define kDivineWindDamage 200
|
||||
#define kDivineWindRadius 500
|
||||
#define kElectricalDamage 20
|
||||
#define kElectricalMaxTargets 2
|
||||
#define kElectricalRange 200
|
||||
#define kElectricalUpgradeResearchCost 30
|
||||
#define kElectricalUpgradeResearchTime 30
|
||||
#define kEnsnareTime 2
|
||||
#define kEvolutionCost 0
|
||||
#define kEvolutionGestateTime 3
|
||||
#define kFadeArmorUpgrade 100
|
||||
#define kFadeBaseArmor 150
|
||||
#define kFadeBaseSpeed 240
|
||||
#define kFadeCost 50
|
||||
#define kFadeGestateTime 25
|
||||
#define kFadeHealth 300
|
||||
#define kFootstepFadeScalar 1300
|
||||
#define kFootstepGorgeScalar 500
|
||||
#define kFootstepHeavyScalar 1020
|
||||
#define kFootstepLerkScalar 1000
|
||||
#define kFootstepMarineScalar 800
|
||||
#define kFootstepOnosScalar 1200
|
||||
#define kFootstepSkulkScalar 800
|
||||
#define kFuncResourceInjectionAmount 1
|
||||
#define kFuncResourceInjectionTime 4
|
||||
#define kGGMaxAmmo 30
|
||||
#define kGGMaxClip 4
|
||||
#define kGameDownloadSize 150
|
||||
#define kGameHDSpaceNeeded 300
|
||||
#define kGameVersionMajor 3
|
||||
#define kGameVersionMinor 2
|
||||
#define kGameVersionRevision 0
|
||||
#define kGestateBaseArmor 150
|
||||
#define kGestateHealth 200
|
||||
#define kGorgeArmorUpgrade 50
|
||||
#define kGorgeBaseArmor 70
|
||||
#define kGorgeBaseSpeed 170
|
||||
#define kGorgeCost 10
|
||||
#define kGorgeGestateTime 10
|
||||
#define kGorgeHealth 150
|
||||
#define kGrenDetonateTime 2
|
||||
#define kGrenadeDamage 125
|
||||
#define kGrenadeForce 800
|
||||
#define kGrenadeLauncherCost 15
|
||||
#define kGrenadeRadius 350
|
||||
#define kGrenadesResearchCost 10
|
||||
#define kGrenadesResearchTime 45
|
||||
#define kHandGrenDetonateTime 0.75
|
||||
#define kHGDamage 20
|
||||
#define kHGMaxAmmo 30
|
||||
#define kHGMaxClip 10
|
||||
#define kHMGCost 15
|
||||
#define kHMGDamage 20
|
||||
#define kHMGMaxAmmo 250
|
||||
#define kHMGMaxClip 125
|
||||
#define kHandGrenadeDamage 80
|
||||
#define kHandGrenadeMaxAmmo 2
|
||||
#define kHealingSprayBuildableScalar 5
|
||||
#define kHealingSprayDamage 13
|
||||
#define kHealingSprayPlayerPercent 4
|
||||
#define kHealthCost 2
|
||||
#define kHealthResearchCost 15
|
||||
#define kHealthResearchTime 20
|
||||
#define kHeavyArmorAbsorbPercent 95
|
||||
#define kHeavyArmorCost 15
|
||||
#define kHeavyArmorResearchCost 40
|
||||
#define kHeavyArmorResearchTime 110
|
||||
#define kHiveBuildTime 180
|
||||
#define kHiveCost 40
|
||||
#define kHiveHealRadius 500
|
||||
#define kHiveHealth 7000
|
||||
#define kHiveRegenerationAmount 2
|
||||
#define kHiveSightRange 3000
|
||||
#define kInfantryPortalBuildTime 10
|
||||
#define kInfantryPortalCost 20
|
||||
#define kInfantryPortalHealth 2500
|
||||
#define kJetpackCost 10
|
||||
#define kJetpacksResearchCost 45
|
||||
#define kJetpacksResearchTime 75
|
||||
#define kKNDamage 30
|
||||
#define kKillRewardMax 3
|
||||
#define kKillRewardMin 1
|
||||
#define kLeapDamage 80
|
||||
#define kLerkArmorUpgrade 30
|
||||
#define kLerkBaseArmor 30
|
||||
#define kLerkBaseSpeed 175
|
||||
#define kLerkCost 30
|
||||
#define kLerkGestateTime 15
|
||||
#define kLerkHealth 125
|
||||
#define kMGDamage 10
|
||||
#define kMGMaxAmmo 250
|
||||
#define kMGMaxClip 50
|
||||
#define kMarineArmorUpgrade 60
|
||||
#define kMarineBaseArmor 30
|
||||
#define kMarineBaseHeavyArmor 200
|
||||
#define kMarineHealth 100
|
||||
#define kMarineHeavyArmorUpgrade 90
|
||||
#define kMarineRespawnTime 10
|
||||
#define kMarineSpawnClips 2
|
||||
#define kMaxEnsnareTime 5
|
||||
#define kMaxMarineEntitiesAllowedInRadius 50
|
||||
#define kMaxTeamStrands 30
|
||||
#define kMetabolizeHealAmount 20
|
||||
#define kMetabolizeResourceCost 0
|
||||
#define kMineCost 10
|
||||
#define kMineDamage 125
|
||||
#define kMineHealth 20
|
||||
#define kMineMaxAmmo 4
|
||||
#define kMineMaxAmmoCombat 1
|
||||
#define kMineRadius 300
|
||||
#define kMotionTrackingResearchCost 35
|
||||
#define kMotionTrackingResearchTime 100
|
||||
#define kMovementChamberBuildTime 12
|
||||
#define kMovementChamberCost 10
|
||||
#define kMovementChamberEnergyRange 500
|
||||
#define kMovementChamberHealth 1000
|
||||
#define kMovementChamberThinkInterval 2
|
||||
#define kNumInitialAlienPoints 25
|
||||
#define kNumInitialMarinePoints 100
|
||||
#define kNumSameAlienStructuresAllowedInRadius 8
|
||||
#define kNumWebsAllowedInRadius 8
|
||||
#define kObservatoryBuildTime 15
|
||||
#define kObservatoryCost 15
|
||||
#define kObservatoryHealth 1700
|
||||
#define kObservatoryXYDetectionRadius 900
|
||||
#define kOffenseChamberBuildTime 11
|
||||
#define kOffenseChamberCost 10
|
||||
#define kOffenseChamberDamage 20
|
||||
#define kOffenseChamberHealth 1000
|
||||
#define kOnosArmorUpgrade 350
|
||||
#define kOnosBaseArmor 600
|
||||
#define kOnosBaseSpeed 240
|
||||
#define kOnosCost 75
|
||||
#define kOnosGestateTime 35
|
||||
#define kOnosHealth 700
|
||||
#define kOrganicStructureHealRate 5
|
||||
#define kParasiteDamage 10
|
||||
#define kPhaseGateBuildTime 12
|
||||
#define kPhaseGateCost 15
|
||||
#define kPhaseGateHealth 3000
|
||||
#define kPhaseTechResearchCost 15
|
||||
#define kPhaseTechResearchTime 45
|
||||
#define kPheromonesBaseDistance 500
|
||||
#define kPheromonesLevelDistance 200
|
||||
#define kPointsPerHealth 50
|
||||
#define kPointsPerArmouryHealth 10
|
||||
#define kPrimalScreamRange 500
|
||||
#define kPrototypeLabBuildTime 20
|
||||
#define kPrototypeLabCost 40
|
||||
#define kPrototypeLabHealth 4000
|
||||
#define kRecycleTime 20
|
||||
#define kResourceTowerActivateTime 2
|
||||
#define kResourceTowerBuildDistanceTolerance 250
|
||||
#define kResourceTowerBuildTime 15
|
||||
#define kResourceTowerCost 15
|
||||
#define kResourceTowerHealth 6000
|
||||
#define kSGBulletsPerShot 10
|
||||
#define kSGDamage 17
|
||||
#define kSGMaxAmmo 40
|
||||
#define kSGMaxClip 8
|
||||
#define kScanDuration 10
|
||||
#define kScanEnergyCost 20
|
||||
#define kScanRadius 800
|
||||
#define kScentOfFearRadiusPerLevel 600
|
||||
#define kScoringAlienUpgradeChamberValue 2
|
||||
#define kScoringCCValue 5
|
||||
#define kScoringHiveValue 8
|
||||
#define kScoringKillPlayer 1
|
||||
#define kScoringKillPlayerFade 4
|
||||
#define kScoringKillPlayerGorge 2
|
||||
#define kScoringKillPlayerHA 4
|
||||
#define kScoringKillPlayerJetpack 3
|
||||
#define kScoringKillPlayerLerk 3
|
||||
#define kScoringKillPlayerOnos 5
|
||||
#define kScoringMarineBuildableValue 2
|
||||
#define kScoringResourceTowerValue 3
|
||||
#define kScoringSiegeValue 3
|
||||
#define kScoringTurretValue 2
|
||||
#define kSensoryChamberBuildTime 14
|
||||
#define kSensoryChamberCost 10
|
||||
#define kSensoryChamberHealth 800
|
||||
#define kSensoryChamberRange 750
|
||||
#define kSentryBuildTime 7
|
||||
#define kSentryCost 10
|
||||
#define kSentryDamage 10
|
||||
#define kSentryHealth 1300
|
||||
#define kShotgunCost 10
|
||||
#define kSiegeBuildTime 10
|
||||
#define kSiegeCost 15
|
||||
#define kSiegeDamage 400
|
||||
#define kSiegeHealth 2000
|
||||
#define kSiegeROF 4
|
||||
#define kSiegeTurretRange 1100
|
||||
#define kSkulkArmorUpgrade 20
|
||||
#define kSkulkBaseArmor 10
|
||||
#define kSkulkBaseSpeed 290
|
||||
#define kSkulkCost 0
|
||||
#define kSkulkGestateTime 3
|
||||
#define kSkulkHealth 70
|
||||
#define kSpikeDamage 16
|
||||
#define kSpitGDamage 30
|
||||
#define kSporeCloudRadius 225
|
||||
#define kSporeCloudTime 6
|
||||
#define kSporeDamage 7
|
||||
#define kStompRadius 250
|
||||
#define kSwipeDamage 80
|
||||
#define kTurretFactoryBuildDistance 400
|
||||
#define kTurretFactoryBuildTime 13
|
||||
#define kTurretFactoryCost 10
|
||||
#define kTurretFactoryHealth 3000
|
||||
#define kTurretFactoryUpgradeCost 15
|
||||
#define kTurretFactoryUpgradeTime 15
|
||||
#define kTurretRange 800
|
||||
#define kUmbraCloudDuration 3
|
||||
#define kUmbraCloudRadius 225
|
||||
#define kUmbraEffectiveness 1
|
||||
#define kUnencumberedPlayerSpeed 220
|
||||
#define kWeaponStayTime 30
|
||||
#define kWeaponsOneResearchCost 20
|
||||
#define kWeaponsOneResearchTime 60
|
||||
#define kWeaponsThreeResearchCost 40
|
||||
#define kWeaponsThreeResearchTime 120
|
||||
#define kWeaponsTwoResearchCost 30
|
||||
#define kWeaponsTwoResearchTime 90
|
||||
#define kWelderCost 5
|
||||
#define kWelderDamage 4
|
||||
#define kWelderRange 90
|
||||
#define kWelderRepairRate 60
|
||||
|
||||
// Float data (up to three decimal places)
|
||||
#define kAcidRocketEnergyCost 0.10
|
||||
#define kAcidRocketForceScalar 0.05
|
||||
#define kAcidRocketROF 1.00
|
||||
#define kAdrenalineEnergyPercentPerLevel 0.33
|
||||
#define kAirspeedMultiplier 3.00
|
||||
#define kAlertExpireTime 20.00
|
||||
#define kAlienArmorLevelOne 0.20
|
||||
#define kAlienArmorLevelThree 0.60
|
||||
#define kAlienArmorLevelTwo 0.40
|
||||
#define kAlienEnergyRate 0.08
|
||||
#define kAlienInnateRegenerationPercentage 0.02
|
||||
#define kAlienRegenerationPercentage 0.03
|
||||
#define kAlienRegenerationTime 2.00
|
||||
#define kAlienRespawnTimeModifier 0.30
|
||||
#define kArmorAbsorptionBase 0.30
|
||||
#define kArmorAbsorptionPerExtraHive 0.10
|
||||
#define kArmorValueBase 0.50
|
||||
#define kArmorValueNonAlien 2.00
|
||||
#define kArmorValuePerHive 0.50
|
||||
#define kAudioAlertInterval 6.00
|
||||
#define kBileBombEnergyCost 0.22
|
||||
#define kBileBombROF 1.50
|
||||
#define kBite2EnergyCost 0.05
|
||||
#define kBite2ROF 0.64
|
||||
#define kBiteEnergyCost 0.05
|
||||
#define kBiteROF 0.80
|
||||
#define kBlinkEnergyCost 0.04
|
||||
#define kBlinkROF 0.05
|
||||
#define kCarapaceSlowFactor 0.00
|
||||
#define kCatalystDamagePercent 0.25
|
||||
#define kCatalystROFFactor 0.25
|
||||
#define kCatalystSpeedIncrease 0.25
|
||||
#define kChargeEnergyCost 0.15
|
||||
#define kChargeMaxPushbackSpeedFactor 2.50
|
||||
#define kChargeMaxPushbackForce 100.0
|
||||
#define kChargePushbackRadius 100.0
|
||||
#define kChargeSpeed 1.00
|
||||
#define kChargeThresholdTime 0.75
|
||||
#define kChargingEnergyScalar 2.80
|
||||
#define kClawsEnergyCost 0.07
|
||||
#define kClawsROF 0.90
|
||||
#define kCloakTime 6.00
|
||||
#define kCombatAdditiveRespawnTime 2.00
|
||||
#define kCombatDistressBeaconDeadPercentage 0.70
|
||||
#define kCombatExperienceAlienGrowthRate 0.00
|
||||
#define kCombatHealExperienceScalar 0.33
|
||||
#define kCombatIronManExperienceScalar 3.00
|
||||
#define kCombatLevelExperienceModifier 0.50
|
||||
#define kCombatModeGestationTimeScalar 0.40
|
||||
#define kCombatModeTimeScalar 0.20
|
||||
#define kCombatResupplyAmmoPercentage 0.40
|
||||
#define kCombatResupplyHealthPercentage 1.00
|
||||
#define kCombatSpawnPercentage 0.25
|
||||
#define kCombatThinkInterval 3.00
|
||||
#define kDebugPVSCoherencyTime 1.00
|
||||
#define kDevourEnergyCost 0.20
|
||||
#define kDevourROF 2.00
|
||||
#define kDigestingSpeedFactor 0.90
|
||||
#define kDivineWindEnergyCost 0.70
|
||||
#define kDivineWindROF 2.00
|
||||
#define kDrawAmount 1.00
|
||||
#define kDrawMaxInterval 5.00
|
||||
#define kDrawMinInterval 2.00
|
||||
#define kElectricalEnergyLoss 0.33
|
||||
#define kEnsnareMaximumSpeedFactor 0.60
|
||||
#define kEnsnareMinimumSpeedFactor 0.10
|
||||
#define kExplodeMaxVerticalSpeed 200
|
||||
#define kExplodeMaxHorisontalSpeed 400
|
||||
#define kFocusDamageUpgradePercentPerLevel 0.33
|
||||
#define kFocusROFPercentSlowdownPerLevel 0.50
|
||||
#define kGGROF 1.20
|
||||
#define kGrenadeLauncherBaseReloadTime 1.10
|
||||
#define kGrenadeLauncherEndReloadTime 1.10
|
||||
#define kGrenadeLauncherGrenadeReloadTime 1.10
|
||||
#define kHGROF 0.20
|
||||
#define kHMGROF 0.10
|
||||
#define kHandGrenadePrimeTime 0.00
|
||||
#define kHealingSprayEnergyCost 0.15
|
||||
#define kHealingSprayROF 1.60
|
||||
#define kHeavySpeedMultiplier 0.95
|
||||
#define kHiveRegenerationPercentage 0.15
|
||||
#define kJetpackSpeedMultiplier 0.95
|
||||
#define kJoinTeamCooldown 3.00
|
||||
#define kKNROF 0.65
|
||||
#define kLeapEnergyCost 0.25
|
||||
#define kLerkBaseSpeedMax 650.0
|
||||
#define kLeapROF 0.50
|
||||
#define kMGROF 0.10
|
||||
#define kMarineArmorLevelOne 0.20
|
||||
#define kMarineArmorLevelThree 0.60
|
||||
#define kMarineArmorLevelTwo 0.40
|
||||
#define kMetabolizeDamageEnergyFactor 0.50
|
||||
#define kMetabolizeEnergyAmount 0.35
|
||||
#define kMetabolizeEnergyCost 0.25
|
||||
#define kMetabolizeROF 2.90
|
||||
#define kMetabolizeSpeedFactor 1.00
|
||||
#define kMinMarineBuildDistance 60.00
|
||||
#define kMinMarinePlayerBuildDistance 16.50
|
||||
#define kMovementChamberEnergyAmount 0.25
|
||||
#define kOrderIconDrawSize 30.00
|
||||
#define kParasiteEnergyCost 0.30
|
||||
#define kParasiteROF 0.50
|
||||
#define kPhaseGateDelay 2.00
|
||||
#define kPhaseGateDepartureInterval 0.50
|
||||
#define kPrimalScreamDamageModifier 0.30
|
||||
#define kPrimalScreamDuration 4.00
|
||||
#define kPrimalScreamEnergyCost 0.45
|
||||
#define kPrimalScreamEnergyFactor 0.60
|
||||
#define kPrimalScreamROF 5.00
|
||||
#define kPrimalScreamROFFactor 0.30
|
||||
#define kRecycleResourcePercentage 0.50
|
||||
#define kRecloakTime 3.0f
|
||||
#define kRedemptionChance 0.45
|
||||
#define kRedemptionThreshold 0.40
|
||||
#define kReinforcementMinimumWaitLevelScalar 0.20
|
||||
#define kReinforcementMinimumWaitScalar 0.50
|
||||
#define kResupplyTime 0.90
|
||||
#define kSGROF 1.30
|
||||
#define kShotgunDamageRange 500.00
|
||||
#define kSilenceLevel1Volume 0.50
|
||||
#define kSilenceLevel2Volume 0.15
|
||||
#define kSilenceLevel3Volume 0.00
|
||||
#define kSpikeEnergyCost 0.03
|
||||
#define kSpikeROF 0.40
|
||||
#define kSpitEnergyCost 0.12
|
||||
#define kSpitROF 0.80
|
||||
#define kSporeCloudThinkInterval 0.50
|
||||
#define kSporeROF 2.00
|
||||
#define kSporesEnergyCost 0.35
|
||||
#define kStompEnergyCost 0.30
|
||||
#define kStompROF 1.50
|
||||
#define kStompTime 1.00
|
||||
#define kSwipeEnergyCost 0.06
|
||||
#define kSwipeROF 0.95
|
||||
#define kTouchDamageInterval 0.05
|
||||
#define kTurretBaseRateOfFire 0.70
|
||||
#define kTurretTrackingRate 1.60
|
||||
#define kUmbraEnergyCost 0.30
|
||||
#define kUmbraROF 1.00
|
||||
#define kUncloakTime 0.50
|
||||
#define kWeaponDamageLevelOne 0.10
|
||||
#define kWeaponDamageLevelThree 0.30
|
||||
#define kWeaponDamageLevelTwo 0.20
|
||||
#define kWebEnergyCost 0.18
|
||||
#define kWebWarmupTime 1.5
|
||||
#define kWebSpinnerROF 0.50
|
||||
#define kWelderBuildingModifier 1.00
|
||||
#define kWelderPlayerModifier 0.50
|
||||
#define kWelderROF 0.40
|
|
@ -1,3 +0,0 @@
|
|||
@echo off (subdirs, prompt for password <-s>, date)
|
||||
c:\"program files"\Winzip\wzzip.exe -P -s -r -ex NS-server-src.zip @assets-shared-source.txt @assets-server-source.txt -x@assets-ignore-source.txt
|
||||
|
|
@ -1,4 +0,0 @@
|
|||
@echo off (subdirs, prompt for password <-s>, date)
|
||||
REM c:\"program files"\Winzip\wzzip.exe -p -r -s -ex NS-src.zip @SourceAssets.txt
|
||||
c:\"program files"\Winzip\wzzip.exe -P -r -s -ex NS-full-src.zip @assets-client-source.txt @assets-shared-source.txt @assets-server-source.txt -x@assets-ignore-source.txt
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
@echo off (subdirs, prompt for password <-s>, date)
|
||||
c:\"Program Files"\Winzip\wzzip.exe -P -r -ex -t100105 NS-diff.zip @assets-common.txt @assets-maps.txt
|
|
@ -1,2 +0,0 @@
|
|||
@echo off (subdirs, prompt for password <-s>, date)
|
||||
c:\"program files"\Winzip\wzzip.exe -P -r -ex NS-full.zip @assets-common.txt @assets-maps.txt
|
|
@ -1,3 +0,0 @@
|
|||
@echo off (subdirs, prompt for password <-s>, date)
|
||||
c:\"program files"\Winzip\wzzip.exe -P -r -ex NS-full-server.zip @assets-server.txt @assets-ns_agora.txt @assets-ns_ayumi.txt @assets-ns_caged.txt @assets-ns_eclipse.txt @assets-ns_hera.txt @assets-ns_lost.txt @assets-ns_metal.txt @assets-ns_mineshaft.txt @assets-ns_nancy.txt @assets-ns_nothing.txt @assets-ns_origin.txt @assets-ns_tanith.txt @assets-ns_veil.txt @assets-combat.txt
|
||||
move NS-full-server.zip c:\download
|
4
main/desktop.ini
Normal file
4
main/desktop.ini
Normal file
|
@ -0,0 +1,4 @@
|
|||
[ViewState]
|
||||
Mode=
|
||||
Vid=
|
||||
FolderType=Generic
|
|
@ -8,7 +8,7 @@ url_dl "http://www.natural-selection.org/"
|
|||
version "v3.0"
|
||||
size "165000000"
|
||||
svonly "0"
|
||||
secure "0"
|
||||
secure "1"
|
||||
cldll "cl_dlls\client.dll"
|
||||
hlversion "1110"
|
||||
// How to allow training but disable "New game"?
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#
|
||||
|
||||
# the following specifies the path to your MOD...
|
||||
MOD_DIR = /usr/local/games/Half-life/hlds_l/ns
|
||||
MOD_DIR = ../
|
||||
|
||||
CPP = egcs
|
||||
|
|
@ -1,20 +0,0 @@
|
|||
# Builds all the projects in the solution...
|
||||
.PHONY: all_projects
|
||||
all_projects: cl_dll.dll ns.dll
|
||||
|
||||
# Builds project 'cl_dll.dll'...
|
||||
.PHONY: cl_dll.dll
|
||||
cl_dll.dll:
|
||||
make --directory="cl_dll/" --file=cl_dll.dll.makefile
|
||||
|
||||
# Builds project 'ns.dll'...
|
||||
.PHONY: ns.dll
|
||||
ns.dll:
|
||||
make --directory="dlls/" --file=ns.dll.makefile
|
||||
|
||||
# Cleans all projects...
|
||||
.PHONY: clean
|
||||
clean:
|
||||
make --directory="cl_dll/" --file=cl_dll.dll.makefile clean
|
||||
make --directory="dlls/" --file=ns.dll.makefile clean
|
||||
|
|
@ -1,2 +0,0 @@
|
|||
#v4.0:v100
|
||||
Playtest|Win32|C:\Users\fabian\Documents\projects\NS\main\source\|
|
Binary file not shown.
Binary file not shown.
|
@ -1,10 +0,0 @@
|
|||
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
|
||||
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level='asInvoker' uiAccess='false' />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
|
@ -1,163 +0,0 @@
|
|||
|
||||
#if defined( FINAL_VAC_BUILD )
|
||||
#define CL_DLLEXPORT
|
||||
#else
|
||||
#define CL_DLLEXPORT __declspec( dllexport )
|
||||
#endif // FINAL_VAC_BUILD
|
||||
|
||||
|
||||
extern "C"
|
||||
{
|
||||
// From hl_weapons
|
||||
void CL_DLLEXPORT HUD_PostRunCmd( struct local_state_s *from, struct local_state_s *to, struct usercmd_s *cmd, int runfuncs, double time, unsigned int random_seed );
|
||||
|
||||
// From cdll_int
|
||||
int CL_DLLEXPORT Initialize( cl_enginefunc_t *pEnginefuncs, int iVersion );
|
||||
int CL_DLLEXPORT HUD_VidInit( void );
|
||||
void CL_DLLEXPORT HUD_Init( void );
|
||||
int CL_DLLEXPORT HUD_Redraw( float flTime, int intermission );
|
||||
int CL_DLLEXPORT HUD_UpdateClientData( client_data_t *cdata, float flTime );
|
||||
void CL_DLLEXPORT HUD_Reset ( void );
|
||||
void CL_DLLEXPORT HUD_PlayerMove( struct playermove_s *ppmove, int server );
|
||||
void CL_DLLEXPORT HUD_PlayerMoveInit( struct playermove_s *ppmove );
|
||||
char CL_DLLEXPORT HUD_PlayerMoveTexture( char *name );
|
||||
int CL_DLLEXPORT HUD_ConnectionlessPacket( const struct netadr_s *net_from, const char *args, char *response_buffer, int *response_buffer_size );
|
||||
int CL_DLLEXPORT HUD_GetHullBounds( int hullnumber, float *mins, float *maxs );
|
||||
void CL_DLLEXPORT HUD_Frame( double time );
|
||||
void CL_DLLEXPORT HUD_VoiceStatus(int entindex, qboolean bTalking);
|
||||
void CL_DLLEXPORT HUD_DirectorMessage( int iSize, void *pbuf );
|
||||
|
||||
// From demo
|
||||
void CL_DLLEXPORT Demo_ReadBuffer( int size, unsigned char *buffer );
|
||||
|
||||
// From entity
|
||||
int CL_DLLEXPORT HUD_AddEntity( int type, struct cl_entity_s *ent, const char *modelname );
|
||||
void CL_DLLEXPORT HUD_CreateEntities( void );
|
||||
void CL_DLLEXPORT HUD_StudioEvent( const struct mstudioevent_s *event, const struct cl_entity_s *entity );
|
||||
void CL_DLLEXPORT HUD_TxferLocalOverrides( struct entity_state_s *state, const struct clientdata_s *client );
|
||||
void CL_DLLEXPORT HUD_ProcessPlayerState( struct entity_state_s *dst, const struct entity_state_s *src );
|
||||
void CL_DLLEXPORT HUD_TxferPredictionData ( struct entity_state_s *ps, const struct entity_state_s *pps, struct clientdata_s *pcd, const struct clientdata_s *ppcd, struct weapon_data_s *wd, const struct weapon_data_s *pwd );
|
||||
void CL_DLLEXPORT HUD_TempEntUpdate( double frametime, double client_time, double cl_gravity, struct tempent_s **ppTempEntFree, struct tempent_s **ppTempEntActive, int ( *Callback_AddVisibleEntity )( struct cl_entity_s *pEntity ), void ( *Callback_TempEntPlaySound )( struct tempent_s *pTemp, float damp ) );
|
||||
struct cl_entity_s CL_DLLEXPORT *HUD_GetUserEntity( int index );
|
||||
|
||||
// From in_camera
|
||||
void CL_DLLEXPORT CAM_Think( void );
|
||||
int CL_DLLEXPORT CL_IsThirdPerson( void );
|
||||
void CL_DLLEXPORT CL_CameraOffset( float *ofs );
|
||||
|
||||
// From input
|
||||
struct kbutton_s CL_DLLEXPORT *KB_Find( const char *name );
|
||||
void CL_DLLEXPORT CL_CreateMove ( float frametime, struct usercmd_s *cmd, int active );
|
||||
void CL_DLLEXPORT HUD_Shutdown( void );
|
||||
int CL_DLLEXPORT HUD_Key_Event( int eventcode, int keynum, const char *pszCurrentBinding );
|
||||
|
||||
// From inputw32
|
||||
void CL_DLLEXPORT IN_ActivateMouse( void );
|
||||
void CL_DLLEXPORT IN_DeactivateMouse( void );
|
||||
void CL_DLLEXPORT IN_MouseEvent (int mstate);
|
||||
void CL_DLLEXPORT IN_Accumulate (void);
|
||||
void CL_DLLEXPORT IN_ClearStates (void);
|
||||
|
||||
// From tri
|
||||
void CL_DLLEXPORT HUD_DrawNormalTriangles( void );
|
||||
void CL_DLLEXPORT HUD_DrawTransparentTriangles( void );
|
||||
|
||||
// From view
|
||||
void CL_DLLEXPORT V_CalcRefdef( struct ref_params_s *pparams );
|
||||
|
||||
// From GameStudioModelRenderer
|
||||
int CL_DLLEXPORT HUD_GetStudioModelInterface( int version, struct r_studio_interface_s **ppinterface, struct engine_studio_api_s *pstudio );
|
||||
}
|
||||
|
||||
|
||||
|
||||
#if defined( FINAL_VAC_BUILD )
|
||||
|
||||
extern cldll_func_dst_t *g_pcldstAddrs;
|
||||
|
||||
// Macros for the client receiving calls from the engine
|
||||
#define RecClInitialize(a, b) (g_pcldstAddrs->pInitFunc(&a, &b))
|
||||
#define RecClHudInit() (g_pcldstAddrs->pHudInitFunc())
|
||||
#define RecClHudVidInit() (g_pcldstAddrs->pHudVidInitFunc())
|
||||
#define RecClHudRedraw(a, b) (g_pcldstAddrs->pHudRedrawFunc(&a, &b))
|
||||
#define RecClHudUpdateClientData(a, b) (g_pcldstAddrs->pHudUpdateClientDataFunc(&a, &b))
|
||||
#define RecClHudReset() (g_pcldstAddrs->pHudResetFunc())
|
||||
#define RecClClientMove(a, b) (g_pcldstAddrs->pClientMove(&a, &b))
|
||||
#define RecClClientMoveInit(a) (g_pcldstAddrs->pClientMoveInit(&a))
|
||||
#define RecClClientTextureType(a) (g_pcldstAddrs->pClientTextureType(&a))
|
||||
#define RecClIN_ActivateMouse() (g_pcldstAddrs->pIN_ActivateMouse())
|
||||
#define RecClIN_DeactivateMouse() (g_pcldstAddrs->pIN_DeactivateMouse())
|
||||
#define RecClIN_MouseEvent(a) (g_pcldstAddrs->pIN_MouseEvent(&a))
|
||||
#define RecClIN_ClearStates() (g_pcldstAddrs->pIN_ClearStates())
|
||||
#define RecClIN_Accumulate() (g_pcldstAddrs->pIN_Accumulate())
|
||||
#define RecClCL_CreateMove(a, b, c) (g_pcldstAddrs->pCL_CreateMove(&a, &b, &c))
|
||||
#define RecClCL_IsThirdPerson() (g_pcldstAddrs->pCL_IsThirdPerson())
|
||||
#define RecClCL_GetCameraOffsets(a) (g_pcldstAddrs->pCL_GetCameraOffsets(&a))
|
||||
#define RecClFindKey(a) (g_pcldstAddrs->pFindKey(&a))
|
||||
#define RecClCamThink() (g_pcldstAddrs->pCamThink())
|
||||
#define RecClCalcRefdef(a) (g_pcldstAddrs->pCalcRefdef(&a))
|
||||
#define RecClAddEntity(a, b, c) (g_pcldstAddrs->pAddEntity(&a, &b, &c))
|
||||
#define RecClCreateEntities() (g_pcldstAddrs->pCreateEntities())
|
||||
#define RecClDrawNormalTriangles() (g_pcldstAddrs->pDrawNormalTriangles())
|
||||
#define RecClDrawTransparentTriangles() (g_pcldstAddrs->pDrawTransparentTriangles())
|
||||
#define RecClStudioEvent(a, b) (g_pcldstAddrs->pStudioEvent(&a, &b))
|
||||
#define RecClPostRunCmd(a, b, c, d, e, f) (g_pcldstAddrs->pPostRunCmd(&a, &b, &c, &d, &e, &f))
|
||||
#define RecClShutdown() (g_pcldstAddrs->pShutdown())
|
||||
#define RecClTxferLocalOverrides(a, b) (g_pcldstAddrs->pTxferLocalOverrides(&a, &b))
|
||||
#define RecClProcessPlayerState(a, b) (g_pcldstAddrs->pProcessPlayerState(&a, &b))
|
||||
#define RecClTxferPredictionData(a, b, c, d, e, f) (g_pcldstAddrs->pTxferPredictionData(&a, &b, &c, &d, &e, &f))
|
||||
#define RecClReadDemoBuffer(a, b) (g_pcldstAddrs->pReadDemoBuffer(&a, &b))
|
||||
#define RecClConnectionlessPacket(a, b, c, d) (g_pcldstAddrs->pConnectionlessPacket(&a, &b, &c, &d))
|
||||
#define RecClGetHullBounds(a, b, c) (g_pcldstAddrs->pGetHullBounds(&a, &b, &c))
|
||||
#define RecClHudFrame(a) (g_pcldstAddrs->pHudFrame(&a))
|
||||
#define RecClKeyEvent(a, b, c) (g_pcldstAddrs->pKeyEvent(&a, &b, &c))
|
||||
#define RecClTempEntUpdate(a, b, c, d, e, f, g) (g_pcldstAddrs->pTempEntUpdate(&a, &b, &c, &d, &e, &f, &g))
|
||||
#define RecClGetUserEntity(a) (g_pcldstAddrs->pGetUserEntity(&a))
|
||||
#define RecClVoiceStatus(a, b) (g_pcldstAddrs->pVoiceStatus(&a, &b))
|
||||
#define RecClDirectorMessage(a, b) (g_pcldstAddrs->pDirectorMessage(&a, &b))
|
||||
#define RecClStudioInterface(a, b, c) (g_pcldstAddrs->pStudioInterface(&a, &b, &c))
|
||||
|
||||
#else
|
||||
|
||||
#define RecClInitialize(a, b)
|
||||
#define RecClHudInit()
|
||||
#define RecClHudVidInit()
|
||||
#define RecClHudRedraw(a, b)
|
||||
#define RecClHudUpdateClientData(a, b)
|
||||
#define RecClHudReset()
|
||||
#define RecClClientMove(a, b)
|
||||
#define RecClClientMoveInit(a)
|
||||
#define RecClClientTextureType(a)
|
||||
#define RecClIN_ActivateMouse()
|
||||
#define RecClIN_DeactivateMouse()
|
||||
#define RecClIN_MouseEvent(a)
|
||||
#define RecClIN_ClearStates()
|
||||
#define RecClIN_Accumulate()
|
||||
#define RecClCL_CreateMove(a, b, c)
|
||||
#define RecClCL_IsThirdPerson()
|
||||
#define RecClCL_GetCameraOffsets(a)
|
||||
#define RecClFindKey(a)
|
||||
#define RecClCamThink()
|
||||
#define RecClCalcRefdef(a)
|
||||
#define RecClAddEntity(a, b, c)
|
||||
#define RecClCreateEntities()
|
||||
#define RecClDrawNormalTriangles()
|
||||
#define RecClDrawTransparentTriangles()
|
||||
#define RecClStudioEvent(a, b)
|
||||
#define RecClPostRunCmd(a, b, c, d, e, f)
|
||||
#define RecClShutdown()
|
||||
#define RecClTxferLocalOverrides(a, b)
|
||||
#define RecClProcessPlayerState(a, b)
|
||||
#define RecClTxferPredictionData(a, b, c, d, e, f)
|
||||
#define RecClReadDemoBuffer(a, b)
|
||||
#define RecClConnectionlessPacket(a, b, c, d)
|
||||
#define RecClGetHullBounds(a, b, c)
|
||||
#define RecClHudFrame(a)
|
||||
#define RecClKeyEvent(a, b, c)
|
||||
#define RecClTempEntUpdate(a, b, c, d, e, f, g)
|
||||
#define RecClGetUserEntity(a)
|
||||
#define RecClVoiceStatus(a, b)
|
||||
#define RecClDirectorMessage(a, b)
|
||||
#define RecClStudioInterface(a, b, c)
|
||||
|
||||
#endif // FINAL_VAC_BUILD
|
|
@ -98,6 +98,7 @@ void CGrenade::Spawn( void ) { }
|
|||
CGrenade * CGrenade:: ShootTimed( entvars_t *pevOwner, Vector vecStart, Vector vecVelocity, float time ){ return 0; }
|
||||
CGrenade *CGrenade::ShootContact( entvars_t *pevOwner, Vector vecStart, Vector vecVelocity ){ return 0; }
|
||||
void CGrenade::DetonateUse( CBaseEntity *pActivator, CBaseEntity *pCaller, USE_TYPE useType, float value ){ }
|
||||
void CGrenade::SetDamageType(int inDamageType) {} //@linux otherwise it says undefined symbol
|
||||
|
||||
void UTIL_Remove( CBaseEntity *pEntity ){ }
|
||||
struct skilldata_t gSkillData;
|
||||
|
|
|
@ -377,6 +377,39 @@ void KeyDown (kbutton_t *b)
|
|||
else
|
||||
k = -1; // typed manually at the console for continuous down
|
||||
|
||||
int theBlockScripts = (int)gHUD.GetServerVariableFloat(kvBlockScripts);
|
||||
|
||||
char *pCmd = gEngfuncs.Cmd_Argv(0);
|
||||
|
||||
if(theBlockScripts && pCmd)
|
||||
{
|
||||
bool bFound = false;
|
||||
|
||||
//Check thier last few commands (this prevents false positives if a player is hits several keys real fast)
|
||||
for (int i = 0; i < g_PrevCmds.size(); i++)
|
||||
{
|
||||
//Check both the key pressed and the command it executed.
|
||||
if(k == g_PrevCmds[i].first && !strcmp(pCmd, g_PrevCmds[i].second.c_str()))
|
||||
{
|
||||
bFound = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(!bFound
|
||||
&& strcmp(pCmd, "+mlook")
|
||||
&& strcmp(pCmd, "+jlook")
|
||||
&& strcmp(pCmd, "+showscores")
|
||||
&& strcmp(pCmd, "+use"))
|
||||
{
|
||||
gEngfuncs.pfnCenterPrint("Scripting is not allowed on this server.");
|
||||
b->down[0] = b->down[1] = 0;
|
||||
b->state = 4; // impulse up
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
if (k == b->down[0] || k == b->down[1])
|
||||
return; // repeating key
|
||||
|
||||
|
@ -928,8 +961,7 @@ if active == 1 then we are 1) not playing back demos ( where our commands are ig
|
|||
void CL_DLLEXPORT CL_CreateMove ( float frametime, struct usercmd_s *cmd, int active )
|
||||
{
|
||||
//RecClCL_CreateMove(frametime, cmd, active);
|
||||
//@2014 Commander overview needs to be fixed!
|
||||
|
||||
//@linux Commander overview needs to be fixed!
|
||||
float spd;
|
||||
vec3_t viewangles;
|
||||
static vec3_t oldangles;
|
||||
|
@ -939,14 +971,17 @@ void CL_DLLEXPORT CL_CreateMove ( float frametime, struct usercmd_s *cmd, int ac
|
|||
int theButtonState = CL_ButtonBits(1);
|
||||
//memset( viewangles, 0, sizeof( vec3_t ) );
|
||||
//viewangles[ 0 ] = viewangles[ 1 ] = viewangles[ 2 ] = 0.0;
|
||||
gEngfuncs.GetViewAngles( (float *)viewangles );
|
||||
//gEngfuncs.GetViewAngles( (float *)viewangles );
|
||||
|
||||
CL_AdjustAngles ( frametime, viewangles );
|
||||
//CL_AdjustAngles ( frametime, viewangles );
|
||||
|
||||
memset (cmd, 0, sizeof(*cmd));
|
||||
|
||||
gEngfuncs.SetViewAngles( (float *)viewangles );
|
||||
/*
|
||||
//@ linux void IN_Move ( float frametime, usercmd_t *cmd)
|
||||
float theRotationDeltas[3] = {0,0,0}; //{90,0,90} --> top down --> viewangles[YAW]
|
||||
float theTranslationDeltas[3] = {0,0,0}; //--> cmd->sidemove
|
||||
|
||||
IN_Move ( frametime, cmd );
|
||||
|
||||
if(gResetViewAngles)
|
||||
{
|
||||
VectorCopy(gViewAngles,viewangles);
|
||||
|
@ -955,11 +990,11 @@ void CL_DLLEXPORT CL_CreateMove ( float frametime, struct usercmd_s *cmd, int ac
|
|||
else
|
||||
{
|
||||
gEngfuncs.GetViewAngles( (float *)viewangles );
|
||||
}*/
|
||||
//VectorAdd(viewangles,rotation,viewangles);
|
||||
//CL_AdjustAngles ( frametime, viewangles );
|
||||
}
|
||||
VectorAdd(viewangles,theRotationDeltas,viewangles);
|
||||
CL_AdjustAngles ( frametime, viewangles );
|
||||
|
||||
//gEngfuncs.SetViewAngles( (float *)viewangles );
|
||||
gEngfuncs.SetViewAngles( (float *)viewangles );
|
||||
VectorCopy (viewangles,gWorldViewAngles);
|
||||
|
||||
// If we're in topdown mode
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
|
@ -26,12 +26,18 @@
|
|||
#include <SDL2/SDL_mouse.h>
|
||||
#include <SDL2/SDL_gamecontroller.h>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <process.h>
|
||||
#endif
|
||||
|
||||
#define MOUSE_BUTTON_COUNT 5
|
||||
|
||||
// Set this to 1 to show mouse cursor. Experimental
|
||||
|
||||
// use IN_SetVisibleMouse to set:
|
||||
int g_iVisibleMouse = 0;
|
||||
|
||||
extern cl_enginefunc_t gEngfuncs;
|
||||
|
||||
extern int iMouseInUse;
|
||||
|
||||
extern kbutton_t in_strafe;
|
||||
|
@ -54,10 +60,13 @@ extern cvar_t *cl_forwardspeed;
|
|||
extern cvar_t *cl_pitchspeed;
|
||||
extern cvar_t *cl_movespeedkey;
|
||||
|
||||
|
||||
#ifdef _WIN32
|
||||
static double s_flRawInputUpdateTime = 0.0f;
|
||||
static bool m_bRawInput = false;
|
||||
static bool m_bMouseThread = false;
|
||||
bool isMouseRelative = false;
|
||||
#endif
|
||||
|
||||
extern globalvars_t *gpGlobals;
|
||||
|
||||
// mouse variables
|
||||
|
@ -75,8 +84,10 @@ static cvar_t *m_customaccel_max;
|
|||
//Mouse move is raised to this power before being scaled by scale factor
|
||||
static cvar_t *m_customaccel_exponent;
|
||||
|
||||
#ifdef _WIN32
|
||||
// if threaded mouse is enabled then the time to sleep between polls
|
||||
static cvar_t *m_mousethread_sleep;
|
||||
static volatile cvar_t *m_mousethread_sleep;
|
||||
#endif
|
||||
|
||||
int mouse_buttons;
|
||||
int mouse_oldbuttonstate;
|
||||
|
@ -113,7 +124,6 @@ enum _ControlList
|
|||
};
|
||||
|
||||
|
||||
|
||||
DWORD dwAxisMap[ JOY_MAX_AXES ];
|
||||
DWORD dwControlMap[ JOY_MAX_AXES ];
|
||||
int pdwRawValue[ JOY_MAX_AXES ];
|
||||
|
@ -152,10 +162,10 @@ cvar_t *joy_wwhack2;
|
|||
int joy_avail, joy_advancedinit, joy_haspov;
|
||||
|
||||
#ifdef _WIN32
|
||||
DWORD s_hMouseThreadId = 0;
|
||||
unsigned int s_hMouseThreadId = 0;
|
||||
HANDLE s_hMouseThread = 0;
|
||||
HANDLE s_hMouseQuitEvent = 0;
|
||||
HANDLE s_hMouseDoneQuitEvent = 0;
|
||||
HANDLE s_hMouseThreadActiveLock = 0;
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
@ -176,49 +186,139 @@ void Force_CenterView_f (void)
|
|||
}
|
||||
|
||||
#ifdef _WIN32
|
||||
long s_mouseDeltaX = 0;
|
||||
long s_mouseDeltaY = 0;
|
||||
POINT old_mouse_pos;
|
||||
|
||||
long ThreadInterlockedExchange( long *pDest, long value )
|
||||
long mouseThreadActive = 0;
|
||||
long mouseThreadCenterX = 0;
|
||||
long mouseThreadCenterY = 0;
|
||||
long mouseThreadDeltaX = 0;
|
||||
long mouseThreadDeltaY = 0;
|
||||
|
||||
bool MouseThread_ActiveLock_Enter( void )
|
||||
{
|
||||
return InterlockedExchange( pDest, value );
|
||||
if(!m_bMouseThread)
|
||||
return true;
|
||||
|
||||
return WAIT_OBJECT_0 == WaitForSingleObject( s_hMouseThreadActiveLock, INFINITE);
|
||||
}
|
||||
|
||||
|
||||
DWORD WINAPI MousePos_ThreadFunction( LPVOID p )
|
||||
void MouseThread_ActiveLock_Exit( void )
|
||||
{
|
||||
s_hMouseDoneQuitEvent = CreateEvent( NULL, FALSE, FALSE, NULL );
|
||||
if(!m_bMouseThread)
|
||||
return;
|
||||
|
||||
while ( 1 )
|
||||
SetEvent( s_hMouseThreadActiveLock );
|
||||
}
|
||||
|
||||
unsigned __stdcall MouseThread_Function( void * pArg )
|
||||
{
|
||||
while ( true )
|
||||
{
|
||||
if ( WaitForSingleObject( s_hMouseQuitEvent, (int)m_mousethread_sleep->value ) == WAIT_OBJECT_0 )
|
||||
int sleepVal = (int)m_mousethread_sleep->value;
|
||||
if(0 > sleepVal) sleepVal = 0;
|
||||
else if(1000 < sleepVal) sleepVal = 1000;
|
||||
if(WAIT_OBJECT_0 == WaitForSingleObject( s_hMouseQuitEvent, sleepVal))
|
||||
{
|
||||
return 0;
|
||||
break;
|
||||
}
|
||||
|
||||
if ( mouseactive )
|
||||
if( MouseThread_ActiveLock_Enter() )
|
||||
{
|
||||
POINT mouse_pos;
|
||||
GetCursorPos(&mouse_pos);
|
||||
if ( InterlockedExchangeAdd(&mouseThreadActive, 0) )
|
||||
{
|
||||
POINT mouse_pos;
|
||||
POINT center_pos;
|
||||
|
||||
center_pos.x = InterlockedExchangeAdd(&mouseThreadCenterX, 0);
|
||||
center_pos.y = InterlockedExchangeAdd(&mouseThreadCenterY, 0);
|
||||
GetCursorPos(&mouse_pos);
|
||||
|
||||
volatile int mx = mouse_pos.x - old_mouse_pos.x + s_mouseDeltaX;
|
||||
volatile int my = mouse_pos.y - old_mouse_pos.y + s_mouseDeltaY;
|
||||
|
||||
ThreadInterlockedExchange( &old_mouse_pos.x, mouse_pos.x );
|
||||
ThreadInterlockedExchange( &old_mouse_pos.y, mouse_pos.y );
|
||||
mouse_pos.x -= center_pos.x;
|
||||
mouse_pos.y -= center_pos.y;
|
||||
|
||||
ThreadInterlockedExchange( &s_mouseDeltaX, mx );
|
||||
ThreadInterlockedExchange( &s_mouseDeltaY, my );
|
||||
if(mouse_pos.x || mouse_pos.y) SetCursorPos( center_pos.x, center_pos.y );
|
||||
|
||||
InterlockedExchangeAdd(&mouseThreadDeltaX, mouse_pos.x);
|
||||
InterlockedExchangeAdd(&mouseThreadDeltaY, mouse_pos.y);
|
||||
}
|
||||
|
||||
MouseThread_ActiveLock_Exit();
|
||||
}
|
||||
}
|
||||
|
||||
SetEvent( s_hMouseDoneQuitEvent );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/// <summary>Updates mouseThreadActive using the global variables mouseactive, g_iVisibleMouse and m_bRawInput. Should be called after any of these is changed.</summary>
|
||||
/// <remarks>Has to be interlocked manually by programmer! Use MouseThread_ActiveLock_Enter and MouseThread_ActiveLock_Exit.</remarks>
|
||||
void UpdateMouseThreadActive(void)
|
||||
{
|
||||
InterlockedExchange(&mouseThreadActive, mouseactive && !g_iVisibleMouse && !m_bRawInput);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
void IN_SetMouseMode(bool enable)
|
||||
{
|
||||
static bool currentMouseMode = false;
|
||||
|
||||
if(enable == currentMouseMode)
|
||||
return;
|
||||
|
||||
if(enable)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
if (mouseparmsvalid)
|
||||
restore_spi = SystemParametersInfo (SPI_SETMOUSE, 0, newmouseparms, 0);
|
||||
|
||||
m_bRawInput = CVAR_GET_FLOAT( "m_rawinput" ) != 0;
|
||||
if(m_bRawInput)
|
||||
{
|
||||
SDL_SetRelativeMouseMode(SDL_TRUE);
|
||||
isMouseRelative = true;
|
||||
}
|
||||
#else
|
||||
SDL_SetRelativeMouseMode(SDL_TRUE);
|
||||
#endif
|
||||
|
||||
currentMouseMode = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef _WIN32
|
||||
if(isMouseRelative)
|
||||
{
|
||||
SDL_SetRelativeMouseMode(SDL_FALSE);
|
||||
isMouseRelative = false;
|
||||
}
|
||||
|
||||
if (restore_spi)
|
||||
SystemParametersInfo (SPI_SETMOUSE, 0, originalmouseparms, 0);
|
||||
#else
|
||||
SDL_SetRelativeMouseMode(SDL_FALSE);
|
||||
#endif
|
||||
|
||||
currentMouseMode = false;
|
||||
}
|
||||
}
|
||||
|
||||
void IN_SetVisibleMouse(bool visible)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
bool lockEntered = MouseThread_ActiveLock_Enter();
|
||||
#endif
|
||||
|
||||
g_iVisibleMouse = visible;
|
||||
|
||||
IN_SetMouseMode(!visible);
|
||||
|
||||
#ifdef _WIN32
|
||||
UpdateMouseThreadActive();
|
||||
if(lockEntered) MouseThread_ActiveLock_Exit();
|
||||
#endif
|
||||
}
|
||||
|
||||
void IN_ResetMouse( void );
|
||||
|
||||
/*
|
||||
===========
|
||||
IN_ActivateMouse
|
||||
|
@ -229,11 +329,20 @@ void CL_DLLEXPORT IN_ActivateMouse (void)
|
|||
if (mouseinitialized)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
if (mouseparmsvalid)
|
||||
restore_spi = SystemParametersInfo (SPI_SETMOUSE, 0, newmouseparms, 0);
|
||||
|
||||
bool lockEntered = MouseThread_ActiveLock_Enter();
|
||||
#endif
|
||||
|
||||
IN_SetMouseMode(true);
|
||||
|
||||
mouseactive = 1;
|
||||
|
||||
#ifdef _WIN32
|
||||
UpdateMouseThreadActive();
|
||||
if(lockEntered) MouseThread_ActiveLock_Exit();
|
||||
#endif
|
||||
|
||||
// now is a good time to reset mouse positon:
|
||||
IN_ResetMouse();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -248,12 +357,17 @@ void CL_DLLEXPORT IN_DeactivateMouse (void)
|
|||
if (mouseinitialized)
|
||||
{
|
||||
#ifdef _WIN32
|
||||
if (restore_spi)
|
||||
SystemParametersInfo (SPI_SETMOUSE, 0, originalmouseparms, 0);
|
||||
|
||||
bool lockEntered = MouseThread_ActiveLock_Enter();
|
||||
#endif
|
||||
|
||||
IN_SetMouseMode(false);
|
||||
|
||||
mouseactive = 0;
|
||||
|
||||
#ifdef _WIN32
|
||||
UpdateMouseThreadActive();
|
||||
if(lockEntered) MouseThread_ActiveLock_Exit();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -307,12 +421,14 @@ void IN_Shutdown (void)
|
|||
if ( s_hMouseQuitEvent )
|
||||
{
|
||||
SetEvent( s_hMouseQuitEvent );
|
||||
WaitForSingleObject( s_hMouseDoneQuitEvent, 100 );
|
||||
}
|
||||
|
||||
if ( s_hMouseThread )
|
||||
{
|
||||
TerminateThread( s_hMouseThread, 0 );
|
||||
if(WAIT_OBJECT_0 != WaitForSingleObject( s_hMouseThread, 5000 ))
|
||||
{
|
||||
TerminateThread( s_hMouseThread, 0 );
|
||||
}
|
||||
CloseHandle( s_hMouseThread );
|
||||
s_hMouseThread = (HANDLE)0;
|
||||
}
|
||||
|
@ -322,12 +438,11 @@ void IN_Shutdown (void)
|
|||
CloseHandle( s_hMouseQuitEvent );
|
||||
s_hMouseQuitEvent = (HANDLE)0;
|
||||
}
|
||||
|
||||
|
||||
if ( s_hMouseDoneQuitEvent )
|
||||
|
||||
if( s_hMouseThreadActiveLock )
|
||||
{
|
||||
CloseHandle( s_hMouseDoneQuitEvent );
|
||||
s_hMouseDoneQuitEvent = (HANDLE)0;
|
||||
CloseHandle( s_hMouseThreadActiveLock );
|
||||
s_hMouseThreadActiveLock = (HANDLE)0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -355,18 +470,24 @@ void IN_ResetMouse( void )
|
|||
{
|
||||
// no work to do in SDL
|
||||
#ifdef _WIN32
|
||||
if ( !m_bRawInput && mouseactive && gEngfuncs.GetWindowCenterX && gEngfuncs.GetWindowCenterY )
|
||||
// reset only if mouse is active and not in visible mode:
|
||||
if(mouseactive && !g_iVisibleMouse)
|
||||
{
|
||||
if ( !m_bRawInput && gEngfuncs.GetWindowCenterX && gEngfuncs.GetWindowCenterY )
|
||||
{
|
||||
bool lockEntered = MouseThread_ActiveLock_Enter();
|
||||
|
||||
SetCursorPos ( gEngfuncs.GetWindowCenterX(), gEngfuncs.GetWindowCenterY() );
|
||||
ThreadInterlockedExchange( &old_mouse_pos.x, gEngfuncs.GetWindowCenterX() );
|
||||
ThreadInterlockedExchange( &old_mouse_pos.y, gEngfuncs.GetWindowCenterY() );
|
||||
}
|
||||
int centerX = gEngfuncs.GetWindowCenterX();
|
||||
int centerY = gEngfuncs.GetWindowCenterY();
|
||||
|
||||
if ( gpGlobals && gpGlobals->time - s_flRawInputUpdateTime > 1.0f )
|
||||
{
|
||||
s_flRawInputUpdateTime = gpGlobals->time;
|
||||
m_bRawInput = CVAR_GET_FLOAT( "m_rawinput" ) != 0;
|
||||
SetCursorPos ( centerX, centerY );
|
||||
InterlockedExchange( &mouseThreadCenterX, centerX );
|
||||
InterlockedExchange( &mouseThreadCenterY, centerY );
|
||||
InterlockedExchange( &mouseThreadDeltaX, 0 );
|
||||
InterlockedExchange( &mouseThreadDeltaY, 0 );
|
||||
|
||||
if(lockEntered) MouseThread_ActiveLock_Exit();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
@ -451,26 +572,12 @@ void IN_ScaleMouse( float *x, float *y )
|
|||
}
|
||||
}
|
||||
|
||||
/*
|
||||
===========
|
||||
IN_MouseMove
|
||||
===========
|
||||
*/
|
||||
void IN_MouseMove ( float frametime, usercmd_t *cmd)
|
||||
void IN_GetMouseDelta( int *pOutX, int *pOutY)
|
||||
{
|
||||
int mx, my;
|
||||
vec3_t viewangles;
|
||||
bool active = mouseactive && !g_iVisibleMouse;
|
||||
int mx, my;
|
||||
|
||||
gEngfuncs.GetViewAngles( (float *)viewangles );
|
||||
|
||||
if ( in_mlook.state & 1)
|
||||
{
|
||||
V_StopPitchDrift ();
|
||||
}
|
||||
|
||||
//jjb - this disbles normal mouse control if the user is trying to
|
||||
// move the camera, or if the mouse cursor is visible or if we're in intermission
|
||||
if ( !iMouseInUse && !gHUD.m_iIntermission && !g_iVisibleMouse )
|
||||
if(active)
|
||||
{
|
||||
int deltaX, deltaY;
|
||||
#ifdef _WIN32
|
||||
|
@ -478,10 +585,12 @@ void IN_MouseMove ( float frametime, usercmd_t *cmd)
|
|||
{
|
||||
if ( m_bMouseThread )
|
||||
{
|
||||
ThreadInterlockedExchange( ¤t_pos.x, s_mouseDeltaX );
|
||||
ThreadInterlockedExchange( ¤t_pos.y, s_mouseDeltaY );
|
||||
ThreadInterlockedExchange( &s_mouseDeltaX, 0 );
|
||||
ThreadInterlockedExchange( &s_mouseDeltaY, 0 );
|
||||
bool lockEntered = MouseThread_ActiveLock_Enter();
|
||||
|
||||
current_pos.x = InterlockedExchange( &mouseThreadDeltaX, 0 );
|
||||
current_pos.y = InterlockedExchange( &mouseThreadDeltaY, 0 );
|
||||
|
||||
if(lockEntered) MouseThread_ActiveLock_Exit();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -520,6 +629,73 @@ void IN_MouseMove ( float frametime, usercmd_t *cmd)
|
|||
mx_accum = 0;
|
||||
my_accum = 0;
|
||||
|
||||
// reset mouse position if required, so there is room to move:
|
||||
#ifdef _WIN32
|
||||
// do not reset if mousethread would do it:
|
||||
if ( m_bRawInput || !m_bMouseThread )
|
||||
#else
|
||||
if(true)
|
||||
#endif
|
||||
IN_ResetMouse();
|
||||
|
||||
#ifdef _WIN32
|
||||
// update m_bRawInput occasionally:
|
||||
if ( gpGlobals && gpGlobals->time - s_flRawInputUpdateTime > 1.0f )
|
||||
{
|
||||
s_flRawInputUpdateTime = gpGlobals->time;
|
||||
|
||||
bool lockEntered = MouseThread_ActiveLock_Enter();
|
||||
|
||||
m_bRawInput = CVAR_GET_FLOAT( "m_rawinput" ) != 0;
|
||||
|
||||
if(m_bRawInput && !isMouseRelative)
|
||||
{
|
||||
SDL_SetRelativeMouseMode(SDL_TRUE);
|
||||
isMouseRelative = true;
|
||||
}
|
||||
else if(!m_bRawInput && isMouseRelative)
|
||||
{
|
||||
SDL_SetRelativeMouseMode(SDL_FALSE);
|
||||
isMouseRelative = false;
|
||||
}
|
||||
|
||||
UpdateMouseThreadActive();
|
||||
if(lockEntered) MouseThread_ActiveLock_Exit();
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
mx = my = 0;
|
||||
}
|
||||
|
||||
if(pOutX) *pOutX = mx;
|
||||
if(pOutY) *pOutY = my;
|
||||
}
|
||||
|
||||
/*
|
||||
===========
|
||||
IN_MouseMove
|
||||
===========
|
||||
*/
|
||||
void IN_MouseMove ( float frametime, usercmd_t *cmd)
|
||||
{
|
||||
int mx, my;
|
||||
vec3_t viewangles;
|
||||
|
||||
gEngfuncs.GetViewAngles( (float *)viewangles );
|
||||
|
||||
if ( in_mlook.state & 1)
|
||||
{
|
||||
V_StopPitchDrift ();
|
||||
}
|
||||
|
||||
//jjb - this disbles normal mouse control if the user is trying to
|
||||
// move the camera, or if the mouse cursor is visible or if we're in intermission
|
||||
if ( !iMouseInUse && !gHUD.m_iIntermission && !g_iVisibleMouse )
|
||||
{
|
||||
IN_GetMouseDelta( &mx, &my );
|
||||
|
||||
if (m_filter && m_filter->value)
|
||||
{
|
||||
mouse_x = (mx + old_mouse_x) * 0.5;
|
||||
|
@ -562,12 +738,6 @@ void IN_MouseMove ( float frametime, usercmd_t *cmd)
|
|||
cmd->forwardmove -= m_forward->value * mouse_y;
|
||||
}
|
||||
}
|
||||
|
||||
// if the mouse has moved, force it to the center, so there's room to move
|
||||
if ( mx || my )
|
||||
{
|
||||
IN_ResetMouse();
|
||||
}
|
||||
}
|
||||
|
||||
gEngfuncs.SetViewAngles( (float *)viewangles );
|
||||
|
@ -616,8 +786,15 @@ void CL_DLLEXPORT IN_Accumulate (void)
|
|||
mx_accum += deltaX;
|
||||
my_accum += deltaY;
|
||||
}
|
||||
|
||||
// force the mouse to the center, so there's room to move
|
||||
IN_ResetMouse();
|
||||
#ifdef _WIN32
|
||||
// do not reset if mousethread would do it:
|
||||
if ( m_bRawInput || !m_bMouseThread )
|
||||
#else
|
||||
if(true)
|
||||
#endif
|
||||
IN_ResetMouse();
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -649,10 +826,10 @@ void IN_StartupJoystick (void)
|
|||
// abort startup if user requests no joystick
|
||||
if ( gEngfuncs.CheckParm ("-nojoy", NULL ) )
|
||||
return;
|
||||
|
||||
// assume no joystick
|
||||
|
||||
// assume no joystick
|
||||
joy_avail = 0;
|
||||
|
||||
|
||||
int nJoysticks = SDL_NumJoysticks();
|
||||
if ( nJoysticks > 0 )
|
||||
{
|
||||
|
@ -677,7 +854,6 @@ void IN_StartupJoystick (void)
|
|||
joy_advancedinit = 0;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -685,23 +861,21 @@ void IN_StartupJoystick (void)
|
|||
{
|
||||
gEngfuncs.Con_DPrintf ("joystick not found -- driver not present\n\n");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
int RawValuePointer (int axis)
|
||||
{
|
||||
switch (axis)
|
||||
{
|
||||
default:
|
||||
case JOY_AXIS_X:
|
||||
return SDL_GameControllerGetAxis( s_pJoystick, SDL_CONTROLLER_AXIS_LEFTX );
|
||||
case JOY_AXIS_Y:
|
||||
return SDL_GameControllerGetAxis( s_pJoystick, SDL_CONTROLLER_AXIS_LEFTY );
|
||||
case JOY_AXIS_Z:
|
||||
return SDL_GameControllerGetAxis( s_pJoystick, SDL_CONTROLLER_AXIS_RIGHTX );
|
||||
case JOY_AXIS_R:
|
||||
return SDL_GameControllerGetAxis( s_pJoystick, SDL_CONTROLLER_AXIS_RIGHTY );
|
||||
default:
|
||||
case JOY_AXIS_X:
|
||||
return SDL_GameControllerGetAxis( s_pJoystick, SDL_CONTROLLER_AXIS_LEFTX );
|
||||
case JOY_AXIS_Y:
|
||||
return SDL_GameControllerGetAxis( s_pJoystick, SDL_CONTROLLER_AXIS_LEFTY );
|
||||
case JOY_AXIS_Z:
|
||||
return SDL_GameControllerGetAxis( s_pJoystick, SDL_CONTROLLER_AXIS_RIGHTX );
|
||||
case JOY_AXIS_R:
|
||||
return SDL_GameControllerGetAxis( s_pJoystick, SDL_CONTROLLER_AXIS_RIGHTY );
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -908,7 +1082,7 @@ void IN_JoyMove ( float frametime, usercmd_t *cmd )
|
|||
// y=ax^b; where a = 300 and b = 1.3
|
||||
// also x values are in increments of 800 (so this is factored out)
|
||||
// then bounds check result to level out excessively high spin rates
|
||||
fTemp = 300.0 * pow(fabs(fAxisValue) / 800.0, 1.3);
|
||||
fTemp = 300.0 * pow(fabs(fAxisValue) / 800.0, 1.3); //fabs for float values
|
||||
if (fTemp > 14000.0)
|
||||
fTemp = 14000.0;
|
||||
// restore direction information
|
||||
|
@ -956,7 +1130,7 @@ void IN_JoyMove ( float frametime, usercmd_t *cmd )
|
|||
// user wants forward control to be forward control
|
||||
if (fabs(fAxisValue) > joy_forwardthreshold->value)
|
||||
{
|
||||
cmd->forwardmove += (fAxisValue * joy_forwardsensitivity->value) * speed * kForwardSpeed;
|
||||
cmd->forwardmove += (fAxisValue * joy_forwardsensitivity->value) * speed * cl_forwardspeed->value;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
@ -964,7 +1138,7 @@ void IN_JoyMove ( float frametime, usercmd_t *cmd )
|
|||
case AxisSide:
|
||||
if (fabs(fAxisValue) > joy_sidethreshold->value)
|
||||
{
|
||||
cmd->sidemove += (fAxisValue * joy_sidesensitivity->value) * speed * kSideSpeed;
|
||||
cmd->sidemove += (fAxisValue * joy_sidesensitivity->value) * speed * cl_sidespeed->value;
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -974,7 +1148,7 @@ void IN_JoyMove ( float frametime, usercmd_t *cmd )
|
|||
// user wants turn control to become side control
|
||||
if (fabs(fAxisValue) > joy_sidethreshold->value)
|
||||
{
|
||||
cmd->sidemove -= (fAxisValue * joy_sidesensitivity->value) * speed * kSideSpeed;
|
||||
cmd->sidemove -= (fAxisValue * joy_sidesensitivity->value) * speed * cl_sidespeed->value;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1090,19 +1264,25 @@ void IN_Init (void)
|
|||
m_customaccel_exponent = gEngfuncs.pfnRegisterVariable ( "m_customaccel_exponent", "1", FCVAR_ARCHIVE );
|
||||
|
||||
#ifdef _WIN32
|
||||
m_bRawInput = CVAR_GET_FLOAT( "m_rawinput" ) > 0;
|
||||
m_bRawInput = CVAR_GET_FLOAT( "m_rawinput" ) != 0;
|
||||
m_bMouseThread = gEngfuncs.CheckParm ("-mousethread", NULL ) != NULL;
|
||||
m_mousethread_sleep = gEngfuncs.pfnRegisterVariable ( "m_mousethread_sleep", "10", FCVAR_ARCHIVE );
|
||||
m_mousethread_sleep = gEngfuncs.pfnRegisterVariable ( "m_mousethread_sleep", "1", FCVAR_ARCHIVE ); // default to less than 1000 Hz
|
||||
|
||||
if ( !m_bRawInput && m_bMouseThread && m_mousethread_sleep )
|
||||
m_bMouseThread = m_bMouseThread && NULL != m_mousethread_sleep;
|
||||
|
||||
if (m_bMouseThread)
|
||||
{
|
||||
s_mouseDeltaX = s_mouseDeltaY = 0;
|
||||
|
||||
s_hMouseQuitEvent = CreateEvent( NULL, FALSE, FALSE, NULL );
|
||||
if ( s_hMouseQuitEvent )
|
||||
s_hMouseThreadActiveLock = CreateEvent( NULL, FALSE, TRUE, NULL );
|
||||
if ( s_hMouseQuitEvent && s_hMouseThreadActiveLock)
|
||||
{
|
||||
s_hMouseThread = CreateThread( NULL, 0, MousePos_ThreadFunction, NULL, 0, &s_hMouseThreadId );
|
||||
s_hMouseThread = (HANDLE)_beginthreadex( NULL, 0, MouseThread_Function, NULL, 0, &s_hMouseThreadId );
|
||||
}
|
||||
|
||||
m_bMouseThread = NULL != s_hMouseThread;
|
||||
|
||||
// at this early stage this won't print anything:
|
||||
// gEngfuncs.Con_DPrintf ("Mouse thread %s.\n", m_bMouseThread ? "initalized" : "failed to initalize");
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
Binary file not shown.
|
@ -266,7 +266,7 @@ void CHudSayText :: SayTextPrint( const char *pszBuf, int iBufSize, int clientIn
|
|||
gHUD.PlayHUDSound("misc/talk.wav", 1);
|
||||
|
||||
Y_START = ScreenHeight()*.7f;
|
||||
|
||||
/* @linux no chat panel
|
||||
ChatPanel* theChatPanel = gViewPort->GetChatPanel();
|
||||
|
||||
if (theChatPanel != NULL)
|
||||
|
@ -284,7 +284,7 @@ void CHudSayText :: SayTextPrint( const char *pszBuf, int iBufSize, int clientIn
|
|||
//KGP: then move the viewport
|
||||
Y_START = theY + theHeight + 5;
|
||||
}
|
||||
|
||||
*/
|
||||
}
|
||||
|
||||
void CHudSayText :: EnsureTextFitsInOneLineAndWrapIfHaveTo( int line )
|
||||
|
|
|
@ -1,10 +1,3 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
|
||||
#include <memory.h>
|
||||
#include "hud.h"
|
||||
#include "cl_util.h"
|
||||
|
@ -17,6 +10,7 @@
|
|||
AngleMatrix
|
||||
|
||||
====================
|
||||
*/
|
||||
|
||||
void AngleMatrix (const float *angles, float (*matrix)[4] )
|
||||
{
|
||||
|
@ -47,7 +41,7 @@ void AngleMatrix (const float *angles, float (*matrix)[4] )
|
|||
matrix[1][3] = 0.0;
|
||||
matrix[2][3] = 0.0;
|
||||
}
|
||||
*/
|
||||
|
||||
/*
|
||||
====================
|
||||
VectorCompare
|
||||
|
|
|
@ -1,9 +1,3 @@
|
|||
//========= Copyright © 1996-2002, Valve LLC, All rights reserved. ============
|
||||
//
|
||||
// Purpose:
|
||||
//
|
||||
// $NoKeywords: $
|
||||
//=============================================================================
|
||||
#if !defined( STUDIO_UTIL_H )
|
||||
#define STUDIO_UTIL_H
|
||||
#if defined( WIN32 )
|
||||
|
|
|
@ -401,6 +401,10 @@ bool HACK_GetPlayerUniqueID( int iPlayer, char playerID[16] )
|
|||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Recalculate the internal scoreboard data
|
||||
//-----------------------------------------------------------------------------
|
||||
//@linux make snprintf work for win32
|
||||
#ifdef _WIN32
|
||||
#define snprintf _snprintf
|
||||
#endif
|
||||
void ScorePanel::Update()
|
||||
{
|
||||
|
||||
|
@ -412,7 +416,8 @@ void ScorePanel::Update()
|
|||
{
|
||||
memset(theServerName, 0, MAX_SERVERNAME_LENGTH+1);
|
||||
int iServerNameLength = max((int)strlen(gViewPort->m_szServerName),MAX_SERVERNAME_LENGTH);
|
||||
strncat(theServerName, gViewPort->m_szServerName, iServerNameLength);
|
||||
//strncat(theServerName, gViewPort->m_szServerName, iServerNameLength); Buffer Overflow?
|
||||
snprintf(theServerName, MAX_SERVERNAME_LENGTH, "%s%s",theServerName ,gViewPort->m_szServerName);
|
||||
}
|
||||
theServerName[MAX_SERVERNAME_LENGTH]=0;
|
||||
char theMapName[MAX_MAPNAME_LENGTH+1];
|
||||
|
|
|
@ -2384,7 +2384,7 @@ bool TeamFortressViewport::SlotInput( int iSlot )
|
|||
// Direct Key Input
|
||||
int TeamFortressViewport::KeyInput( int down, int keynum, const char *pszCurrentBinding )
|
||||
{
|
||||
|
||||
/*@linux remove chat
|
||||
if (m_chatPanel->isVisible())
|
||||
{
|
||||
// Don't let the game handle the input while the user is typing in the
|
||||
|
@ -2405,7 +2405,7 @@ int TeamFortressViewport::KeyInput( int down, int keynum, const char *pszCurrent
|
|||
m_chatPanel->requestFocus();
|
||||
m_chatPanel->SetChatMode(ChatPanel::chatModeTeam);
|
||||
return 0;
|
||||
}
|
||||
}*/
|
||||
|
||||
// Open Text Window?
|
||||
if (m_pCurrentMenu && gEngfuncs.Con_IsVisible() == false)
|
||||
|
|
|
@ -45,11 +45,11 @@ void CL_DLLEXPORT V_CalcRefdef( struct ref_params_s *pparams );
|
|||
void PM_ParticleLine( float *start, float *end, int pcolor, float life, float vert);
|
||||
int PM_GetVisEntInfo( int ent );
|
||||
int PM_GetPhysEntInfo( int ent );
|
||||
//@2014
|
||||
//@linux
|
||||
void InterpolateAngles( float * start, float * end, float * output, float frac );
|
||||
void NormalizeAngles( float * angles );
|
||||
//extern "C" float Distance(const float * v1, const float * v2);
|
||||
float AngleBetweenVectors(const float * v1, const float * v2 );
|
||||
//float AngleBetweenVectors(const float * v1, const float * v2 );
|
||||
|
||||
void V_DropPunchAngle ( float frametime, float *ev_punchangle );
|
||||
void VectorAngles( const float *forward, float *angles );
|
||||
|
@ -119,8 +119,8 @@ cvar_t v_ipitch_level = {"v_ipitch_level", "0.3", 0, 0.3};
|
|||
|
||||
float v_idlescale; // used by TFC for concussion grenade effect
|
||||
|
||||
//@2014 hack linker error??? only win??
|
||||
#ifdef _WIN32
|
||||
//@linux
|
||||
|
||||
void NormalizeAngles( float *angles )
|
||||
{
|
||||
int i;
|
||||
|
@ -176,7 +176,6 @@ void InterpolateAngles( float *start, float *end, float *output, float frac )
|
|||
|
||||
NormalizeAngles( output );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
===================
|
||||
|
@ -184,7 +183,7 @@ AngleBetweenVectors
|
|||
|
||||
===================
|
||||
*/
|
||||
float AngleBetweenVectors( const vec3_t v1, const vec3_t v2 )
|
||||
float AngleBetweenVectors( float* v1, float* v2 )
|
||||
{
|
||||
float angle;
|
||||
float l1 = Length( v1 );
|
||||
|
@ -198,7 +197,7 @@ float AngleBetweenVectors( const vec3_t v1, const vec3_t v2 )
|
|||
|
||||
return angle;
|
||||
}
|
||||
#endif
|
||||
|
||||
//=============================================================================
|
||||
/*
|
||||
void V_NormalizeAngles( float *angles )
|
||||
|
@ -2222,7 +2221,14 @@ void CL_DLLEXPORT V_CalcRefdef( struct ref_params_s *pparams )
|
|||
}
|
||||
else if ( !pparams->paused )
|
||||
{
|
||||
V_CalcNormalRefdef ( pparams );
|
||||
if(gHUD.GetInTopDownMode())
|
||||
{
|
||||
V_CalcTopDownRefdef ( pparams );
|
||||
}
|
||||
else
|
||||
{
|
||||
V_CalcNormalRefdef ( pparams );
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1,10 +0,0 @@
|
|||
<?xml version='1.0' encoding='UTF-8' standalone='yes'?>
|
||||
<assembly xmlns='urn:schemas-microsoft-com:asm.v1' manifestVersion='1.0'>
|
||||
<trustInfo xmlns="urn:schemas-microsoft-com:asm.v3">
|
||||
<security>
|
||||
<requestedPrivileges>
|
||||
<requestedExecutionLevel level='asInvoker' uiAccess='false' />
|
||||
</requestedPrivileges>
|
||||
</security>
|
||||
</trustInfo>
|
||||
</assembly>
|
|
@ -1,2 +0,0 @@
|
|||
#v4.0:v100
|
||||
Playtest|Win32|C:\Users\fabian\Documents\projects\NS\main\source\|
|
Binary file not shown.
|
@ -1,6 +1,6 @@
|
|||
/***
|
||||
*
|
||||
* Copyright (c) 1996-2001, Valve LLC. All rights reserved.
|
||||
* Copyright (c) 1996-2001, Valve LLC. All rights reserved.
|
||||
*
|
||||
* This product contains software technology licensed from Id
|
||||
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
|
||||
|
@ -545,7 +545,7 @@ int CBaseEntity :: TakeDamage( entvars_t* pevInflictor, entvars_t* pevAttacker,
|
|||
// save damage based on the target's armor level
|
||||
|
||||
// figure momentum add (don't let hurt brushes or other triggers move player)
|
||||
if ((!FNullEnt(pevInflictor)) && (pev->movetype == MOVETYPE_WALK || pev->movetype == MOVETYPE_STEP) && (pevAttacker->solid != SOLID_TRIGGER) )
|
||||
if ((!FNullEnt(pevInflictor)) && (pev->movetype == MOVETYPE_WALK || pev->movetype == MOVETYPE_STEP) && (pevAttacker->solid != SOLID_TRIGGER) && !this->IsPlayer())
|
||||
{
|
||||
Vector vecDir = pev->origin - (pevInflictor->absmin + pevInflictor->absmax) * 0.5;
|
||||
vecDir = vecDir.Normalize();
|
||||
|
@ -764,7 +764,7 @@ int CBaseEntity :: DamageDecal( int bitsDamageType )
|
|||
|
||||
// NOTE: szName must be a pointer to constant memory, e.g. "monster_class" because the entity
|
||||
// will keep a pointer to it after this call.
|
||||
CBaseEntity * CBaseEntity::Create( const char *szName, const Vector &vecOrigin, const Vector &vecAngles, edict_t *pentOwner )
|
||||
CBaseEntity * CBaseEntity::Create( const char *szName, const Vector &vecOrigin, const Vector &vecAngles, edict_t *pentOwner )
|
||||
{
|
||||
edict_t *pent;
|
||||
CBaseEntity *pEntity;
|
||||
|
|
|
@ -56,7 +56,6 @@ extern enginefuncs_t g_engfuncs;
|
|||
#define TRACE_HULL (*g_engfuncs.pfnTraceHull)
|
||||
#define GET_AIM_VECTOR (*g_engfuncs.pfnGetAimVector)
|
||||
#define SERVER_COMMAND (*g_engfuncs.pfnServerCommand)
|
||||
|
||||
#ifdef SERVER_EXECUTE
|
||||
#undef SERVER_EXECUTE
|
||||
#endif
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include "../mod/AvHMarineWeaponConstants.h"
|
||||
#include "../mod/AvHGamerules.h"
|
||||
#include "../mod/AvHServerVariables.h"
|
||||
#include "../util/MathUtil.h"
|
||||
|
||||
#include "../util/MathUtil.h"
|
||||
#include "../common/vec_op.h"
|
||||
|
||||
|
@ -46,18 +46,16 @@ LINK_ENTITY_TO_CLASS( grenade, CGrenade );
|
|||
//
|
||||
// Grenade Explode
|
||||
//
|
||||
//@2014 --> leads to undefined symbol
|
||||
/*
|
||||
void CGrenade::SetDamageType(int inDamageType) {
|
||||
this->m_damageType=inDamageType;
|
||||
}*/
|
||||
}
|
||||
|
||||
void CGrenade::Explode( Vector vecSrc, Vector vecAim)
|
||||
{
|
||||
TraceResult tr;
|
||||
UTIL_TraceLine ( pev->origin, pev->origin + Vector ( 0, 0, -32 ), ignore_monsters, ENT(pev), & tr);
|
||||
|
||||
Explode( &tr, this->m_damageType);
|
||||
Explode( &tr,this->m_damageType);
|
||||
}
|
||||
|
||||
// UNDONE: temporary scorching for PreAlpha - find a less sleazy permenant solution.
|
||||
|
@ -495,9 +493,7 @@ CGrenade *CGrenade::ShootContact( entvars_t *pevOwner, Vector vecStart, Vector v
|
|||
CGrenade* CGrenade::ShootExplosiveTimed( entvars_t *pevOwner, Vector vecStart, Vector vecVelocity, float time, int inDamageType)
|
||||
{
|
||||
CGrenade *pGrenade = CGrenade::ShootTimed(pevOwner, vecStart, vecVelocity, time);
|
||||
//@2014
|
||||
//pGrenade->SetDamageType(inDamageType);
|
||||
pGrenade->m_damageType=inDamageType;
|
||||
pGrenade->SetDamageType(inDamageType);
|
||||
pGrenade->SetTouch(&CGrenade::ExplosiveBounceTouch);
|
||||
return pGrenade;
|
||||
}
|
||||
|
|
|
@ -31,8 +31,8 @@
|
|||
#include "../mod/AvHMarineWeaponConstants.h"
|
||||
#include "../mod/AvHGamerules.h"
|
||||
#include "../mod/AvHServerVariables.h"
|
||||
#include "../util/MathUtil.h"
|
||||
#include "../util/MathUtil.h"
|
||||
|
||||
#include "util/MathUtil.h"
|
||||
#include "../common/vec_op.h"
|
||||
|
||||
//===================grenade
|
||||
|
@ -46,11 +46,9 @@ LINK_ENTITY_TO_CLASS( grenade, CGrenade );
|
|||
//
|
||||
// Grenade Explode
|
||||
//
|
||||
//@2014 however never called --> leads to undefined symbol
|
||||
/*
|
||||
void CGrenade::SetDamageType(int inDamageType) {
|
||||
this->m_damageType=inDamageType;
|
||||
}*/
|
||||
}
|
||||
|
||||
void CGrenade::Explode( Vector vecSrc, Vector vecAim)
|
||||
{
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -77,12 +77,11 @@ public:
|
|||
virtual void BounceSound( void );
|
||||
virtual int BloodColor( void ) { return DONT_BLEED; }
|
||||
virtual void Killed( entvars_t *pevAttacker, int iGib );
|
||||
//virtual void SetDamageType(int inDamageType);
|
||||
int m_damageType;
|
||||
virtual void SetDamageType(int inDamageType);
|
||||
|
||||
BOOL m_fRegisteredSound;// whether or not this grenade has issued its DANGER sound to the world sound list yet.
|
||||
private:
|
||||
//int m_damageType;//@2014
|
||||
int m_damageType;
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -206,7 +206,7 @@ private:
|
|||
#define AMMO_URANIUMBOX_GIVE 20
|
||||
#define AMMO_SNARKBOX_GIVE 5
|
||||
|
||||
#include "../common/bullettypes.h"
|
||||
#include "..common/bullettypes.h"
|
||||
|
||||
#define ITEM_FLAG_SELECTONEMPTY 1
|
||||
#define ITEM_FLAG_NOAUTORELOAD 2
|
||||
|
|
|
@ -1,82 +0,0 @@
|
|||
/***
|
||||
*
|
||||
* Copyright (c) 1996-2002, Valve LLC. All rights reserved.
|
||||
*
|
||||
* This product contains software technology licensed from Id
|
||||
* Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
|
||||
* All Rights Reserved.
|
||||
*
|
||||
* Use, distribution, and modification of this source code and/or resulting
|
||||
* object code is restricted to non-commercial enhancements to products from
|
||||
* Valve LLC. All other use, distribution, or modification is prohibited
|
||||
* without written permission from Valve LLC.
|
||||
*
|
||||
****/
|
||||
#ifndef PROGS_H
|
||||
#define PROGS_H
|
||||
|
||||
#include "progdefs.h"
|
||||
|
||||
// 16 simultaneous events, max
|
||||
#define MAX_EVENT_QUEUE 64
|
||||
|
||||
#define DEFAULT_EVENT_RESENDS 1
|
||||
|
||||
#include "event_flags.h"
|
||||
|
||||
typedef struct event_info_s event_info_t;
|
||||
|
||||
#include "event_args.h"
|
||||
|
||||
struct event_info_s
|
||||
{
|
||||
unsigned short index; // 0 implies not in use
|
||||
|
||||
short packet_index; // Use data from state info for entity in delta_packet . -1 implies separate info based on event
|
||||
// parameter signature
|
||||
short entity_index; // The edict this event is associated with
|
||||
|
||||
float fire_time; // if non-zero, the time when the event should be fired ( fixed up on the client )
|
||||
|
||||
event_args_t args;
|
||||
|
||||
// CLIENT ONLY
|
||||
int flags; // Reliable or not, etc.
|
||||
|
||||
};
|
||||
|
||||
typedef struct event_state_s event_state_t;
|
||||
|
||||
struct event_state_s
|
||||
{
|
||||
struct event_info_s ei[ MAX_EVENT_QUEUE ];
|
||||
};
|
||||
|
||||
#if !defined( ENTITY_STATEH )
|
||||
#include "entity_state.h"
|
||||
#endif
|
||||
|
||||
#if !defined( EDICT_H )
|
||||
#include "edict.h"
|
||||
#endif
|
||||
|
||||
#define STRUCT_FROM_LINK(l,t,m) ((t *)((byte *)l - (int)&(((t *)0)->m)))
|
||||
#define EDICT_FROM_AREA(l) STRUCT_FROM_LINK(l,edict_t,area)
|
||||
|
||||
//============================================================================
|
||||
|
||||
extern char *pr_strings;
|
||||
extern globalvars_t gGlobalVariables;
|
||||
|
||||
//============================================================================
|
||||
|
||||
edict_t *ED_Alloc (void);
|
||||
void ED_Free (edict_t *ed);
|
||||
void ED_LoadFromFile (char *data);
|
||||
|
||||
edict_t *EDICT_NUM(int n);
|
||||
int NUM_FOR_EDICT(const edict_t *e);
|
||||
|
||||
#define PROG_TO_EDICT(e) ((edict_t *)((byte *)sv.edicts + e))
|
||||
|
||||
#endif // PROGS_H
|
|
@ -1,5 +0,0 @@
|
|||
@echo off
|
||||
pscp flayra@www.jarhedz.com:/home/flayra/build/linux/ns_i386.zip ..\dlls
|
||||
cd ..\dlls
|
||||
c:\"program files"\Winzip\wzunzip.exe ns_i386.zip
|
||||
cd ..\source
|
0
main/source/includes/lpng1610/contrib/pngminus/png2pnm.bat
Executable file → Normal file
0
main/source/includes/lpng1610/contrib/pngminus/png2pnm.bat
Executable file → Normal file
0
main/source/includes/lpng1610/contrib/pngminus/pngminus.bat
Executable file → Normal file
0
main/source/includes/lpng1610/contrib/pngminus/pngminus.bat
Executable file → Normal file
0
main/source/includes/lpng1610/contrib/pngminus/pnm2png.bat
Executable file → Normal file
0
main/source/includes/lpng1610/contrib/pngminus/pnm2png.bat
Executable file → Normal file
Binary file not shown.
|
@ -120,11 +120,7 @@ LIBEXT=a
|
|||
MAKE+= -j8
|
||||
|
||||
MAKE_HL_LIB=$(MAKE) -f Makefile.nsdll
|
||||
MAKE_DMC_LIB=$(MAKE) -f Makefile.dmcdll
|
||||
MAKE_RICOCHET_LIB=$(MAKE) -f Makefile.ricochetdll
|
||||
MAKE_hl_cdll=$(MAKE) -f Makefile.hl_cdll
|
||||
MAKE_DMC_CDLL=$(MAKE) -f Makefile.dmc_cdll
|
||||
MAKE_RICOCHET_CDLL=$(MAKE) -f Makefile.ricochet_cdll
|
||||
|
||||
#############################################################################
|
||||
# SETUP AND BUILD
|
||||
|
@ -136,11 +132,7 @@ TARGETS=
|
|||
|
||||
TARGETS+= \
|
||||
ns \
|
||||
dmc \
|
||||
ricochet \
|
||||
hl_cdll \
|
||||
dmc_cdll \
|
||||
ricochet_cdll \
|
||||
|
||||
build_dir:
|
||||
-mkdir $(BUILD_DIR);
|
||||
|
@ -152,20 +144,8 @@ targets: $(TARGETS)
|
|||
hl_cdll: build_dir
|
||||
$(MAKE_hl_cdll) ARCH=i686 CC=$(CC) CPLUS=$(CPLUS) CPP_LIB="$(CPP_LIB)" BUILD_DIR=$(BUILD_DIR) BUILD_OBJ_DIR=$(BUILD_OBJ_DIR) SOURCE_DIR=$(SOURCE_DIR) ENGINE_SRC_DIR=$(ENGINE_SRC_DIR) MOD_SRC_DIR=$(MOD_SRC_DIR) COMMON_SRC_DIR=$(COMMON_SRC_DIR) BASE_CFLAGS="$(BASE_CFLAGS)" PUBLIC_SRC_DIR=$(PUBLIC_SRC_DIR) DBG_SRC_DIR=$(DBG_SRC_DIR) ARCH_CFLAGS="$(ARCH_CFLAGS_I686)" GAME_SHARED_SRC_DIR=$(GAME_SHARED_SRC_DIR) CLINK=$(CLINK) PM_SRC_DIR=$(PM_SRC_DIR) SHLIBEXT=$(SHLIBEXT) SHLIBCFLAGS=$(SHLIBCFLAGS) SHLIBLDFLAGS=$(SHLIBLDFLAGS) CFG=$(CFG) OS=$(OS)
|
||||
|
||||
dmc_cdll: build_dir
|
||||
$(MAKE_DMC_CDLL) ARCH=i686 CC=$(CC) CPLUS=$(CPLUS) CPP_LIB="$(CPP_LIB)" BUILD_DIR=$(BUILD_DIR) BUILD_OBJ_DIR=$(BUILD_OBJ_DIR) SOURCE_DIR=$(SOURCE_DIR) ENGINE_SRC_DIR=$(ENGINE_SRC_DIR) COMMON_SRC_DIR=$(COMMON_SRC_DIR) BASE_CFLAGS="$(BASE_CFLAGS)" PUBLIC_SRC_DIR=$(PUBLIC_SRC_DIR) DBG_SRC_DIR=$(DBG_SRC_DIR) ARCH_CFLAGS="$(ARCH_CFLAGS_I686)" GAME_SHARED_SRC_DIR=$(GAME_SHARED_SRC_DIR) CLINK=$(CLINK) PM_SRC_DIR=$(PM_SRC_DIR) SHLIBEXT=$(SHLIBEXT) SHLIBCFLAGS=$(SHLIBCFLAGS) SHLIBLDFLAGS=$(SHLIBLDFLAGS) CFG=$(CFG) OS=$(OS)
|
||||
|
||||
ricochet_cdll: build_dir
|
||||
$(MAKE_RICOCHET_CDLL) ARCH=i686 CC=$(CC) CPLUS=$(CPLUS) CPP_LIB="$(CPP_LIB)" BUILD_DIR=$(BUILD_DIR) BUILD_OBJ_DIR=$(BUILD_OBJ_DIR) SOURCE_DIR=$(SOURCE_DIR) ENGINE_SRC_DIR=$(ENGINE_SRC_DIR) COMMON_SRC_DIR=$(COMMON_SRC_DIR) BASE_CFLAGS="$(BASE_CFLAGS)" PUBLIC_SRC_DIR=$(PUBLIC_SRC_DIR) DBG_SRC_DIR=$(DBG_SRC_DIR) ARCH_CFLAGS="$(ARCH_CFLAGS_I686)" GAME_SHARED_SRC_DIR=$(GAME_SHARED_SRC_DIR) CLINK=$(CLINK) PM_SRC_DIR=$(PM_SRC_DIR) SHLIBEXT=$(SHLIBEXT) SHLIBCFLAGS=$(SHLIBCFLAGS) SHLIBLDFLAGS=$(SHLIBLDFLAGS) CFG=$(CFG) OS=$(OS)
|
||||
|
||||
ns: build_dir
|
||||
$(MAKE_HL_LIB) CC=$(CC) ARCH=$(ARCH) CPP_LIB="$(CPP_LIB)" BUILD_DIR=$(BUILD_DIR) BUILD_OBJ_DIR=$(BUILD_OBJ_DIR) SOURCE_DIR=$(SOURCE_DIR) ENGINE_SRC_DIR=$(ENGINE_SRC_DIR) COMMON_SRC_DIR=$(COMMON_SRC_DIR) PM_SRC_DIR=$(PM_SRC_DIR) GAME_SHARED_SRC_DIR=$(GAME_SHARED_SRC_DIR) GAMEDB_SRC_DIR=$(GAMEDB_SRC_DIR) BASE_CFLAGS="$(BASE_CFLAGS)" SHLIBEXT=$(SHLIBEXT) SHLIBCFLAGS=$(SHLIBCFLAGS) SHLIBLDFLAGS=$(SHLIBLDFLAGS) PUBLIC_SRC_DIR=$(PUBLIC_SRC_DIR) CFG=$(CFG) OS=$(OS) ARCH_CFLAGS="$(ARCH_CFLAGS_I686)"
|
||||
|
||||
dmc: build_dir
|
||||
$(MAKE_DMC_LIB) CC=$(CC) CPLUS=$(CPLUS) CPP_LIB="$(CPP_LIB)" ARCH=$(ARCH) BUILD_DIR=$(BUILD_DIR) BUILD_OBJ_DIR=$(BUILD_OBJ_DIR) SOURCE_DIR=$(SOURCE_DIR) ENGINE_SRC_DIR=$(ENGINE_SRC_DIR) COMMON_SRC_DIR=$(COMMON_SRC_DIR) GAME_SHARED_SRC_DIR=$(GAME_SHARED_SRC_DIR) BASE_CFLAGS="$(BASE_CFLAGS)" SHLIBEXT=$(SHLIBEXT) SHLIBCFLAGS=$(SHLIBCFLAGS) SHLIBLDFLAGS=$(SHLIBLDFLAGS) PUBLIC_SRC_DIR=$(PUBLIC_SRC_DIR) CFG=$(CFG) OS=$(OS) CLINK=$(CLINK) ARCH_CFLAGS="$(ARCH_CFLAGS_I686)"
|
||||
|
||||
ricochet: build_dir
|
||||
$(MAKE_RICOCHET_LIB) CC=$(CC) CPLUS=$(CPLUS) CPP_LIB="$(CPP_LIB)" ARCH=$(ARCH) BUILD_DIR=$(BUILD_DIR) BUILD_OBJ_DIR=$(BUILD_OBJ_DIR) SOURCE_DIR=$(SOURCE_DIR) ENGINE_SRC_DIR=$(ENGINE_SRC_DIR) COMMON_SRC_DIR=$(COMMON_SRC_DIR) GAME_SHARED_SRC_DIR=$(GAME_SHARED_SRC_DIR) BASE_CFLAGS="$(BASE_CFLAGS)" SHLIBEXT=$(SHLIBEXT) SHLIBCFLAGS=$(SHLIBCFLAGS) SHLIBLDFLAGS=$(SHLIBLDFLAGS) PUBLIC_SRC_DIR=$(PUBLIC_SRC_DIR) CFG=$(CFG) OS=$(OS) CLINK=$(CLINK) ARCH_CFLAGS="$(ARCH_CFLAGS_I686)"
|
||||
|
||||
clean:
|
||||
-rm -rf $(BUILD_OBJ_DIR)
|
||||
|
|
|
@ -25,15 +25,14 @@ GAME_SHARED_OBJ_DIR=$(HL1_OBJ_DIR)/game_shared
|
|||
PM_SHARED_OBJ_DIR=$(HL1_OBJ_DIR)/pm_shared
|
||||
HL1_SERVER_OBJ_DIR=$(HL1_OBJ_DIR)/server
|
||||
|
||||
CFLAGS=$(BASE_CFLAGS) $(ARCH_CFLAGS) -DCLIENT_DLL -I/usr/include/malloc -D_snwprintf=swprintf \
|
||||
-DDISABLE_JUMP_ORIGIN -DDISABLE_VEC_FUNCS -DDISABLE_VEC_ORIGIN -DAVH_CLIENT -DUSE_OLDAUTH -DAVH_NO_NEXUS -DNDEBUG -DASSERT=assert -Dsprintf_s=snprintf
|
||||
CFLAGS=$(BASE_CFLAGS) $(ARCH_CFLAGS) -DCLIENT_DLL -I/usr/include/malloc -D_snwprintf=swprintf -DAVH_CLIENT -DUSE_OLDAUTH -DAVH_NO_NEXUS -DNDEBUG -DASSERT=assert -Dsprintf_s=snprintf -DDISABLE_VEC_FUNCS -DDISABLE_VEC_ORIGIN
|
||||
|
||||
INCLUDEDIRS= -I$(HL_SRC_DIR) -I$(NS_MOD_SRC_DIR) -I$(COMMON_SRC_DIR) -I$(PUBLIC_SRC_DIR) -I$(PM_SHARED_SRC_DIR) -I../engine -I$(GAME_SHARED_SRC_DIR) -I../external/ -I../particles -I../includes/fmodapi375linux/api/inc -I$(HL_SERVER_SRC_DIR) -I$(HL_SRC_DIR)/cl_dll -I$(VGUI_INCLUDE_DIR) -I$(UI_INCLUDE_DIR) -I$(UTIL_SRC_DIR) -I../ -I../includes/fmodapi375linux/api
|
||||
|
||||
ifeq ($(OS),Darwin)
|
||||
LDFLAGS=$(SHLIBLDFLAGS) $(CPP_LIB) -framework Carbon $(CFG)/vgui.dylib -L. -lSDL2-2.0.0
|
||||
else
|
||||
LDFLAGS=$(SHLIBLDFLAGS) $(CPP_LIB) -lpng -lz -lparticleMP -lfmod-3.75 -L$(CFG) vgui.so -L. libSDL2-2.0.so.0
|
||||
LDFLAGS=$(SHLIBLDFLAGS) $(CPP_LIB) -lpng -lz -lfmod-3.75 -L$(CFG) vgui.so -L. libSDL2-2.0.so.0 -L. libparticleMP.a
|
||||
endif
|
||||
|
||||
DO_CC=$(CPLUS) $(INCLUDEDIRS) $(CFLAGS) -o $@ -c $<
|
||||
|
@ -252,9 +251,7 @@ all: client.$(SHLIBEXT)
|
|||
|
||||
client.$(SHLIBEXT): $(HL1_OBJS) $(MOD_OBJS) $(PUBLIC_OBJS) $(COMMON_OBJS) $(GAME_SHARED_OBJS) $(DLL_OBJS) $(PM_SHARED_OBJS) $(UI_OBJS) $(UTIL_OBJS) $(TEXTREP_OBJS)
|
||||
$(CLINK) -o $(BUILD_DIR)/$@ $(HL1_OBJS) $(MOD_OBJS) $(PUBLIC_OBJS) $(COMMON_OBJS) $(GAME_SHARED_OBJS) $(DLL_OBJS) $(PM_SHARED_OBJS) $(UI_OBJS) $(UTIL_OBJS) $(TEXTREP_OBJS) $(LDFLAGS) $(CPP_LIB)
|
||||
p4 edit ../../game/mod/cl_dlls/$@
|
||||
cp $(BUILD_DIR)/$@ ../../game/mod/cl_dlls
|
||||
./gendbg.sh ../../game/mod/cl_dlls/client.$(SHLIBEXT)
|
||||
@echo "Done..."
|
||||
|
||||
$(HL1_OBJ_DIR):
|
||||
mkdir -p $(HL1_OBJ_DIR)
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#
|
||||
# NS game library Makefile for x86 Linux
|
||||
#
|
||||
# Feb 2001 by Leon Hartwig (hartwig@valvesoftware.com)
|
||||
# 11.2015 Makefile
|
||||
#
|
||||
|
||||
HLDLL_SRC_DIR=$(SOURCE_DIR)/dlls
|
||||
|
@ -9,6 +9,7 @@ HLWPN_SRC_DIR=$(HLDLL_SRC_DIR)/wpn_shared
|
|||
NS_MOD_SRC_DIR=$(SOURCE_DIR)/mod
|
||||
UTIL_SRC_DIR=$(SOURCE_DIR)/util
|
||||
TEXTREP_SRC_DIR=$(SOURCE_DIR)/textrep
|
||||
PM_SHARED_SRC_DIR=$(SOURCE_DIR)/pm_shared
|
||||
|
||||
HLDLL_OBJ_DIR=$(BUILD_OBJ_DIR)/hldll
|
||||
HLWPN_OBJ_DIR=$(HLDLL_OBJ_DIR)/wpn_shared
|
||||
|
@ -19,13 +20,13 @@ UTIL_OBJ_DIR=$(HLDLL_OBJ_DIR)/util
|
|||
TEXTREP_OBJ_DIR=$(HLDLL_OBJ_DIR)/textrep
|
||||
|
||||
#CFLAGS=$(BASE_CFLAGS) $(ARCH_CFLAGS) $(SHLIBCFLAGS) -DCLIENT_WEAPONS
|
||||
CFLAGS=$(BASE_CFLAGS) $(ARCH_CFLAGS) -Dstricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -DAVH_SERVER -DLINUX -DVALVE_DLL -DQUIVER -DVOXEL -DQUAKE2 -DDEDICATED -DSWDS -D_STLP_USE_GLIBC -DUSE_OLDAUTH -Dsprintf_s=snprintf -D_stricmp=strcasecmp -DCURL_STATICLIB -DDDISABLE_VEC_FUNCS
|
||||
CFLAGS=$(BASE_CFLAGS) $(ARCH_CFLAGS) -Dstricmp=strcasecmp -D_strnicmp=strncasecmp -Dstrnicmp=strncasecmp -DAVH_SERVER -DLINUX -DVALVE_DLL -DQUIVER -DVOXEL -DQUAKE2 -DDEDICATED -DSWDS -D_STLP_USE_GLIBC -DUSE_OLDAUTH -Dsprintf_s=snprintf -D_stricmp=strcasecmp -DCURL_STATICLIB -DDISABLE_VEC_FUNCS -D_FORTIFY_SOURCE=0
|
||||
#-O3 -ffast-math -fno-strength-reduce
|
||||
|
||||
HLDLL_INCLUDEDIRS=-I$(HLDLL_SRC_DIR) -I../ -I$(ENGINE_SRC_DIR) -I$(COMMON_SRC_DIR) -I$(PM_SRC_DIR) -I$(GAME_SHARED_SRC_DIR) -I$(PUBLIC_SRC_DIR) -I$(UTIL_SRC_DIR) -I$(NS_MOD_SRC_DIR) -I$(PM_OBJ_DIR)
|
||||
PM_INCLUDEDIRS=-I$(COMMON_SRC_DIR) -I$(PUBLIC_SRC_DIR)
|
||||
PM_INCLUDEDIRS=-I$(COMMON_SRC_DIR) -I$(PUBLIC_SRC_DIR) -I$(PM_SHARED_SRC_DIR)
|
||||
GAME_SHARED_INCLUDEDIRS=-I$(HLDLL_SRC_DIR) -I$(ENGINE_SRC_DIR) -I$(COMMON_SRC_DIR) -I$(PM_SRC_DIR) -I$(PUBLIC_SRC_DIR) -I$(COMMON_SRC_DIR)
|
||||
MOD_INCLUDEDIRS=-I$(UTIL_SRC_DIR) -I$(GAME_SHARED_SRC_DIR) -I$(HLDLL_SRC_DIR) -I$(PUBLIC_SRC_DIR) -I$(COMMON_SRC_DIR) -I$(ENGINE_SRC_DIR) -I../particle -I../cdll/
|
||||
MOD_INCLUDEDIRS=-I$(UTIL_SRC_DIR) -I$(GAME_SHARED_SRC_DIR) -I$(HLDLL_SRC_DIR) -I$(PUBLIC_SRC_DIR) -I$(COMMON_SRC_DIR) -I$(ENGINE_SRC_DIR) -I../particles -I../cdll/
|
||||
UTIL_INCLUDEDIRS = -I../ -I../util
|
||||
TEXTREP_INCLUDEDIRS=..
|
||||
|
||||
|
@ -222,10 +223,8 @@ dirs:
|
|||
|
||||
ns.$(SHLIBEXT): $(HLDLL_OBJS) $(MOD_OBJS) $(PM_OBJS) $(GAME_SHARED_OBJS) $(UTIL_OBJS) $(TEXTREP_OBJS)
|
||||
$(CC) $(SHLIBLDFLAGS) -o $(BUILD_DIR)/$@ $(HLDLL_OBJS) $(MOD_OBJS) $(PM_OBJS) $(GAME_SHARED_OBJS) $(UTIL_OBJS) $(TEXTREP_OBJS) $(LDFLAGS)
|
||||
p4 edit ../../game/mod/dlls/ns.$(SHLIBEXT)
|
||||
cp $(BUILD_DIR)/$@ ../../game/mod/dlls/ns.$(SHLIBEXT)
|
||||
./gendbg.sh ../../game/mod/dlls/ns.$(SHLIBEXT)
|
||||
|
||||
@echo "Done..."
|
||||
|
||||
$(NS_MOD_OBJ_DIR)/%.o: $(NS_MOD_SRC_DIR)/%.cpp
|
||||
$(DO_MOD_CC)
|
||||
|
||||
|
@ -249,5 +248,5 @@ clean:
|
|||
-rm -rf $(PM_OBJ_DIR)
|
||||
-rm -rf $(HLWPN_OBJ_DIR)
|
||||
-rm -rf $(HLDLL_OBJ_DIR)
|
||||
-rm -f ns_$(ARCH).$(SHLIBEXT)
|
||||
-rm -f ns.$(SHLIBEXT)
|
||||
|
||||
|
|
|
@ -1,53 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
UNAME=`uname`
|
||||
if [ "$UNAME" == "Darwin" ]; then
|
||||
p4 edit $1.dSYM/...
|
||||
dsymutil $1
|
||||
p4 revert -a $1.dSYM/...
|
||||
exit 0;
|
||||
fi
|
||||
|
||||
OBJCOPY=/valve/bin/objcopy
|
||||
|
||||
function usage {
|
||||
echo "$0 /path/to/input/file [-o /path/to/output/file ]"
|
||||
echo ""
|
||||
}
|
||||
|
||||
if [ $# == 0 ]; then
|
||||
usage
|
||||
exit 2
|
||||
fi
|
||||
|
||||
if [ $(basename $1) == $1 ]; then
|
||||
INFILEDIR=$PWD
|
||||
else
|
||||
INFILEDIR=$(cd ${1%/*} && echo $PWD)
|
||||
fi
|
||||
INFILE=$(basename $1)
|
||||
|
||||
OUTFILEDIR=$INFILEDIR
|
||||
OUTFILE=$INFILE.dbg
|
||||
|
||||
while getopts "o:" opt; do
|
||||
case $opt in
|
||||
o)
|
||||
OUTFILEDIR=$(cd ${OPTARG%/*} && echo $PWD)
|
||||
OUTFILE=$(basename $OPTARG)
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ "$OUTFILEDIR" != "$INFILEDIR" ]; then
|
||||
INFILE=${INFILEDIR}/${INFILE}
|
||||
OUTFILE=${OUTFILEDIR}/${OUTFILE}
|
||||
fi
|
||||
|
||||
pushd "$INFILEDIR"
|
||||
p4 edit "$OUTFILE"
|
||||
$OBJCOPY "$INFILE" "$OUTFILE"
|
||||
$OBJCOPY --add-gnu-debuglink="$OUTFILE" "$INFILE"
|
||||
p4 revert -a "$OUTFILE"
|
||||
popd
|
||||
|
File diff suppressed because it is too large
Load diff
Binary file not shown.
BIN
main/source/linux/vgui.so
Executable file → Normal file
BIN
main/source/linux/vgui.so
Executable file → Normal file
Binary file not shown.
|
@ -228,10 +228,10 @@ extern int CL_ButtonBits(int);
|
|||
extern int g_iVisibleMouse;
|
||||
|
||||
//@2014 make this work for linux
|
||||
/*
|
||||
|
||||
GammaTable AvHHud::sPregameGammaTable;
|
||||
GammaTable AvHHud::sGameGammaTable;
|
||||
*/
|
||||
|
||||
|
||||
bool AvHHud::sShowMap = false;
|
||||
|
||||
|
@ -347,10 +347,11 @@ sPregameGammaTable.InitializeToVideoState();
|
|||
|
||||
bool AvHHud::OnKeyEvent(int virtualKey, int scanCode, bool pressed)
|
||||
{
|
||||
|
||||
if (gViewPort != NULL && !mSteamUIActive)
|
||||
{
|
||||
|
||||
ChatPanel* theChatPanel = gViewPort->GetChatPanel();
|
||||
//@linux no chat Panel for Linux
|
||||
/*ChatPanel* theChatPanel = gViewPort->GetChatPanel();
|
||||
|
||||
if (theChatPanel && theChatPanel->isVisible())
|
||||
{
|
||||
|
@ -365,8 +366,8 @@ bool AvHHud::OnKeyEvent(int virtualKey, int scanCode, bool pressed)
|
|||
// the key up needs to go to HL.
|
||||
return theChatPanel->WasKeyPushed(virtualKey);
|
||||
}
|
||||
}
|
||||
//@2014 VK_ESCAPE --> KEY_ESCAPE
|
||||
}*/
|
||||
//@linux VK_ESCAPE --> KEY_ESCAPE
|
||||
if (virtualKey == KEY_ESCAPE && GetInTopDownMode() && mGhostBuilding != MESSAGE_NULL)
|
||||
{
|
||||
if (pressed)
|
||||
|
@ -1766,12 +1767,9 @@ AvHMessageID AvHHud::HotKeyHit(char inChar)
|
|||
return gCommanderHandler.HotKeyHit(inChar);
|
||||
}
|
||||
//@2014 make this work for linux
|
||||
|
||||
float AvHHud::GetGammaSlope() const
|
||||
{
|
||||
//return sGameGammaTable.GetGammaSlope();
|
||||
float mSlope = 1.0f;
|
||||
return mSlope;
|
||||
return sGameGammaTable.GetGammaSlope();
|
||||
}
|
||||
string AvHHud::GetMapName(bool inLocalOnly) const
|
||||
{
|
||||
|
@ -6765,7 +6763,6 @@ bool AvHHud::GetSafeForSpriteDrawing() const
|
|||
bool theSafeForDrawing = false;
|
||||
|
||||
const char* theLevelName = gEngfuncs.pfnGetLevelName();
|
||||
|
||||
string theCurrentMapName = this->GetMapName(true);
|
||||
if(theLevelName && (theCurrentMapName != ""))
|
||||
{
|
||||
|
|
|
@ -1767,13 +1767,12 @@ AvHMessageID AvHHud::HotKeyHit(char inChar)
|
|||
return gCommanderHandler.HotKeyHit(inChar);
|
||||
}
|
||||
//@2014 make this work for linux
|
||||
|
||||
#ifdef _WIN
|
||||
float AvHHud::GetGammaSlope() const
|
||||
{
|
||||
//return sGameGammaTable.GetGammaSlope();
|
||||
float mSlope = 1.0f;
|
||||
return mSlope;
|
||||
return sGameGammaTable.GetGammaSlope();
|
||||
}
|
||||
#endif
|
||||
string AvHHud::GetMapName(bool inLocalOnly) const
|
||||
{
|
||||
string theMapName = this->mMapName;
|
||||
|
@ -6766,7 +6765,6 @@ bool AvHHud::GetSafeForSpriteDrawing() const
|
|||
bool theSafeForDrawing = false;
|
||||
|
||||
const char* theLevelName = gEngfuncs.pfnGetLevelName();
|
||||
|
||||
string theCurrentMapName = this->GetMapName(true);
|
||||
if(theLevelName && (theCurrentMapName != ""))
|
||||
{
|
||||
|
|
|
@ -128,7 +128,7 @@
|
|||
#include "AvHVisibleBlipList.h"
|
||||
#include "AvHMapExtents.h"
|
||||
#include "AvHSpecials.h"
|
||||
//#include "GammaTable.h"
|
||||
#include "GammaTable.h"
|
||||
#include "AvHBaseInfoLocation.h"
|
||||
#include "AvHTooltip.h"
|
||||
#include "AvHTechSlotManager.h"
|
||||
|
@ -671,10 +671,9 @@ private:
|
|||
int mNumLocalSelectEvents;
|
||||
AvHMapMode mMapMode;
|
||||
//@2014 make this work for linux
|
||||
/*
|
||||
static GammaTable sPregameGammaTable;
|
||||
static GammaTable sGameGammaTable;
|
||||
*/
|
||||
|
||||
|
||||
float mDesiredGammaSlope;
|
||||
|
||||
|
|
|
@ -1,871 +0,0 @@
|
|||
//======== (C) Copyright 2001 Charles G. Cleveland All rights reserved. =========
|
||||
//
|
||||
// The copyright to the contents herein is the property of Charles G. Cleveland.
|
||||
// The contents may be used and/or copied only with the written permission of
|
||||
// Charles G. Cleveland, or in accordance with the terms and conditions stipulated in
|
||||
// the agreement/contract under which the contents have been supplied.
|
||||
//
|
||||
// Purpose: Main NS HUD, also interface to client network messages
|
||||
//
|
||||
// $Workfile: AvHHud.h $
|
||||
// $Date: 2002/10/24 21:29:49 $
|
||||
//
|
||||
//-------------------------------------------------------------------------------
|
||||
// $Log: AvHHud.h,v $
|
||||
// Revision 1.60 2002/10/24 21:29:49 Flayra
|
||||
// - Moved help client-side
|
||||
// - Fixed particle/changelevel crash
|
||||
// - Reworked marine upgrade drawing
|
||||
// - Added lots of utility functions for help system (mirrors functions on server)
|
||||
// - Removed gamma message unless it failed or if maxplayers is 1
|
||||
// - Fixed alien hive sight crash
|
||||
// - Show players under reticle while in ready room and spectating
|
||||
// - Removed ugly/too-prevalent user3 icons
|
||||
//
|
||||
// Revision 1.59 2002/10/03 20:24:39 Flayra
|
||||
// - Changes for "more resources required"
|
||||
//
|
||||
// Revision 1.58 2002/10/03 18:54:31 Flayra
|
||||
// - Allow right-click to cancel building placement
|
||||
// - Fixed help icons
|
||||
// - Added a couple utility functions
|
||||
// - Reworked order notification
|
||||
// - Reworked blip network messages to avoid hard-coded limit
|
||||
// - Sent max resources down with current resources
|
||||
// - Countdown sound no longer prevents other hud sounds
|
||||
// - Alien trigger sounds
|
||||
// - New order sounds
|
||||
// - No longer disable nodes out of our cost range
|
||||
//
|
||||
// Revision 1.57 2002/09/25 20:47:22 Flayra
|
||||
// - Don't draw elements on HUD when dead
|
||||
// - UI refactoring
|
||||
// - Split reticle help into help text and reticle text
|
||||
// - Removed use order
|
||||
// - Added separate select sound for alien
|
||||
// - Multiple move sounds
|
||||
// - Only draw entity build/health status when under reticle (no more scanning around you)
|
||||
// - Added 3 new sayings
|
||||
//
|
||||
// Revision 1.56 2002/09/23 22:18:25 Flayra
|
||||
// - Added alien build circles
|
||||
// - Game status changes so particles aren't sent every time
|
||||
// - Demo playback changes (save restore basic data that HUD already has)
|
||||
// - New alert sounds
|
||||
// - Skin support
|
||||
//
|
||||
// Revision 1.55 2002/09/09 19:55:24 Flayra
|
||||
// - Added hive info indicator
|
||||
// - Fixed bug where reticle tooltip help text wasn't being set until a weapon was selected
|
||||
// - Fixed release mode bug where tooltips weren't expiring
|
||||
// - Fixed bug where marine upgrades blinked
|
||||
// - "No commander" indicator now blinks
|
||||
//
|
||||
// Revision 1.54 2002/08/31 18:01:01 Flayra
|
||||
// - Work at VALVe
|
||||
//
|
||||
// Revision 1.53 2002/08/16 02:37:49 Flayra
|
||||
// - HUD sounds no longer cut each other off (they won't play instead of cutting off another sound)
|
||||
// - Tooltip sounds
|
||||
// - Selection issues
|
||||
// - Draw rings around buildings that need to be built
|
||||
// - Removed old overwatch code
|
||||
//
|
||||
// Revision 1.52 2002/08/09 01:02:51 Flayra
|
||||
// - Added hooks for demo playback, removed prediction selection
|
||||
//
|
||||
// Revision 1.51 2002/08/02 22:51:28 Flayra
|
||||
// - Fixed memory overwrite...eek!
|
||||
//
|
||||
// Revision 1.50 2002/08/02 21:59:12 Flayra
|
||||
// - Added reticle help, new tooltip system and much nicer order drawing! Refactored view model drawing a bit, hoping to make texture blending work for it.
|
||||
//
|
||||
// Revision 1.49 2002/07/26 23:05:01 Flayra
|
||||
// - Generate numerical feedback for damage events
|
||||
// - Refactoring for more info when looking at something (instead of bad-looking player names only)
|
||||
//
|
||||
// Revision 1.48 2002/07/23 17:07:37 Flayra
|
||||
// - Added visually-smooth energy level, added versatile location code, new hive sight info, refactored to remove extra sprites (128 HUD sprites bug), commander tech help fixes
|
||||
//
|
||||
// Revision 1.47 2002/07/08 17:07:56 Flayra
|
||||
// - Started to add display of marine upgrade sprite, fixed bug where building indicators aren't displayed after a map change, info_location drawing changes, primal scream color tweak, removed old hive drawing code
|
||||
//
|
||||
// Revision 1.46 2002/07/01 21:35:05 Flayra
|
||||
// - Removed lots of outdated sprites and sprite code, added building ranges, fixed ghost building problem (bug #82)
|
||||
//
|
||||
// Revision 1.45 2002/06/25 18:03:09 Flayra
|
||||
// - Added info_locations, removed old weapon help system, added smooth resource swelling, lots of alien UI usability changes, fixed problem with ghost building
|
||||
//
|
||||
// Revision 1.44 2002/06/10 19:55:36 Flayra
|
||||
// - New commander UI (bindable via hotkeys, added REMOVE_SELECTION for when clicking menu options when no players selected)
|
||||
//
|
||||
// Revision 1.43 2002/06/03 16:48:45 Flayra
|
||||
// - Help sprites moved into one animated sprite, select sound volume reduced (now that sound is normalized)
|
||||
//
|
||||
// Revision 1.42 2002/05/28 17:48:14 Flayra
|
||||
// - Minimap refactoring, reinforcement refactoring, new hive sight fixes, recycling support
|
||||
//
|
||||
// Revision 1.41 2002/05/23 02:33:42 Flayra
|
||||
// - Post-crash checkin. Restored @Backup from around 4/16. Contains changes for last four weeks of development.
|
||||
//
|
||||
//===============================================================================
|
||||
#ifndef AVHHUD_H
|
||||
#define AVHHUD_H
|
||||
|
||||
#include "UIHud.h"
|
||||
#include "AvHConstants.h"
|
||||
#include "AvHSpecials.h"
|
||||
#include "AvHSharedTypes.h"
|
||||
#include "AvHParticleSystem.h"
|
||||
#include "entity_state.h"
|
||||
#include "VGUI_ProgressBar.h"
|
||||
#include "AvHEntityHierarchy.h"
|
||||
#include "MarqueeComponent.h"
|
||||
#include "AvHOrder.h"
|
||||
#include "AvHMessage.h"
|
||||
#include "AvHAmbientSound.h"
|
||||
#include "AvHTechTree.h"
|
||||
#include "AvHVisibleBlipList.h"
|
||||
#include "AvHMapExtents.h"
|
||||
#include "AvHSpecials.h"
|
||||
#include "GammaTable.h"
|
||||
#include "AvHBaseInfoLocation.h"
|
||||
#include "AvHTooltip.h"
|
||||
#include "AvHTechSlotManager.h"
|
||||
#include "AvHHudConstants.h"
|
||||
#include "AvHOverviewMap.h"
|
||||
|
||||
class AvHTeamHierarchy;
|
||||
class PieMenu;
|
||||
class FadingImageLabel;
|
||||
using vgui::Cursor;
|
||||
|
||||
struct AnimatedSprite
|
||||
{
|
||||
float mCurrentFrame;
|
||||
int mData;
|
||||
};
|
||||
|
||||
class SelectionEffect
|
||||
{
|
||||
public:
|
||||
SelectionEffect() : mEntIndex(-1), mAngleOffset(0)
|
||||
{}
|
||||
|
||||
int mEntIndex;
|
||||
int mAngleOffset;
|
||||
};
|
||||
|
||||
typedef enum
|
||||
{
|
||||
MAIN_MODE,
|
||||
EDITPS_MODE,
|
||||
SCOREBOARD_MODE
|
||||
} UIMode;
|
||||
|
||||
typedef vector<SelectionEffect> SelectionListType;
|
||||
|
||||
class NumericalInfoEffect
|
||||
{
|
||||
public:
|
||||
NumericalInfoEffect(float inPosition[3], float inNumber, int inEventType, float inTimeCreated);
|
||||
void GetPosition(float* outPosition) const;
|
||||
float GetNumber() const;
|
||||
int GetEventType() const;
|
||||
float GetTimeCreated() const;
|
||||
void SetPosition(float inPosition[3]);
|
||||
|
||||
private:
|
||||
float mPosition[3];
|
||||
float mNumber;
|
||||
int mEventType;
|
||||
float mTimeCreated;
|
||||
};
|
||||
|
||||
const int kNumUpgradeLines = 5;
|
||||
|
||||
class AvHHud : public UIHud
|
||||
{
|
||||
public:
|
||||
AvHHud(const string& inFilename, UIFactory* inFactory);
|
||||
virtual ~AvHHud(void);
|
||||
|
||||
void OnActivateSteamUI();
|
||||
void OnDeactivateSteamUI();
|
||||
void OnLostFocus();
|
||||
bool OnKeyEvent(int virtualKey, int scanCode, bool pressed);
|
||||
|
||||
void AddMiniMapAlert(float x, float y);
|
||||
void AddNumericalInfoMessage(float inOrigin[3], float inNumber, int inEventType);
|
||||
void AddTooltip(const char* inMessageText, bool inIsToolTip = true, float inTooltipWidth = kToolTipMaxWidth);
|
||||
bool AddTooltipOnce(const char* inMessageText, bool inIsToolTip = true);
|
||||
void Cancel();
|
||||
|
||||
void ClearSelection();
|
||||
|
||||
void ClientProcessEntity(struct entity_state_s* inEntity);
|
||||
|
||||
void ComponentJustPainted(Panel* inPanel);
|
||||
|
||||
bool GetAndClearAlienAbility(AvHMessageID& outMessageID);
|
||||
bool GetAndClearGroupEvent(AvHMessageID& outMessageID);
|
||||
bool GetAndClearTechEvent(AvHMessageID& outMessageID);
|
||||
bool GetLastHotkeySelectionEvent(AvHMessageID& outMessageID);
|
||||
void SetLastHotkeySelectionEvent(AvHMessageID inMessageID);
|
||||
|
||||
// Returns true if particles should be rendered in the HUD.
|
||||
bool GetParticlesVisible() const;
|
||||
bool GetSafeForSpriteDrawing() const;
|
||||
|
||||
void ClearTrackingEntity();
|
||||
int GetTrackingEntity() const;
|
||||
|
||||
bool GetIsRegionBlockedByUI(float inNormX, float inNormY);
|
||||
|
||||
//int GetArmorLevel(void) const;
|
||||
int GetCommanderIndex() const;
|
||||
bool GetHasJetpack() const;
|
||||
int GetHelpIconFrameFromUser3(AvHUser3 inUser3);
|
||||
HSPRITE GetHelpSprite() const;
|
||||
bool GetHasAlienUpgradesAvailable() const;
|
||||
bool GetIsAlien() const;
|
||||
bool GetIsBeingDigested() const;
|
||||
bool GetIsEnsnared() const;
|
||||
bool GetIsDigesting() const;
|
||||
bool GetIsStunned() const;
|
||||
bool GetIsNotInControl() const;
|
||||
bool GetIsInTopDownMode() const;
|
||||
bool GetIsMarine() const;
|
||||
bool GetIsRelevant() const;
|
||||
bool GetIsShowingMap() const;
|
||||
AvHPlayMode GetPlayMode(void) const;
|
||||
bool GetAlienHelpForMessage(int inMessageID, string& outHelpText, int& outPointCost) const;
|
||||
bool GetDoesPlayerHaveOrder() const;
|
||||
bool GetHelpForMessage(int inMessageID, string& outHelpText) const;
|
||||
bool GetInTopDownMode() const;
|
||||
bool GetIsSelecting() const;
|
||||
OrderListType GetOrderList() const;
|
||||
AvHOrderType GetOrderMode() const;
|
||||
bool GetCenterPositionForGroup(int inGroupNumber, vec3_t& outCenterPosition) const;
|
||||
bool GetMouseOneDown() const;
|
||||
bool GetMouseTwoDown() const;
|
||||
bool GetAndClearTopDownScrollAmount(int& outX, int& outY, int& outZ);
|
||||
bool GetAndClearSelectionEvent(vec3_t& outSelectionXY, AvHMessageID& outMessageID);
|
||||
EntityListType GetSelected() const;
|
||||
const AvHTechSlotManager& GetTechSlotManager() const;
|
||||
bool GetTranslatedUser3Name(AvHUser3 inUser3, string& outString) const;
|
||||
bool GetTranslatedUser3Description(AvHUser3 inUser3, bool inFriendly, string& outString) const;
|
||||
vec3_t GetVisualOrigin() const;
|
||||
|
||||
AvHMessageID HotKeyHit(char inChar);
|
||||
|
||||
virtual void Init(void);
|
||||
virtual void PostUIInit(void);
|
||||
virtual void VidInit(void);
|
||||
virtual void InitHUDData( void );
|
||||
virtual void InitExploitPrevention( void );
|
||||
void UpdateExploitPrevention();
|
||||
|
||||
bool GetGameStarted() const;
|
||||
int GetGameTime() const;
|
||||
int GetGameTimeLimit() const;
|
||||
int GetCombatAttackingTeamNumber() const;
|
||||
static bool GetShowingMap();
|
||||
|
||||
static void PlayStream();
|
||||
static void StopStream();
|
||||
|
||||
bool GetIsAlive(bool inIncludeSpectating = true) const;
|
||||
void GhostBuildingCallback( struct tempent_s *ent, float frametime, float currenttime);
|
||||
void CancelBuilding();
|
||||
|
||||
void PlayHUDSound(const char *szSound, float vol, float inSoundLength = 0.0f);
|
||||
void PlayHUDSound(int iSound, float vol, float inSoundLength = 0.0f);
|
||||
void PlayHUDSound(AvHHUDSound inSound);
|
||||
|
||||
float GetHUDExperience() const;
|
||||
int GetHUDExperienceLevel() const;
|
||||
float GetHUDHandicap() const;
|
||||
AvHUser3 GetHUDUser3() const;
|
||||
AvHPlayMode GetHUDPlayMode() const;
|
||||
AvHTeamNumber GetHUDTeam() const;
|
||||
int GetHUDUpgrades() const;
|
||||
int GetHUDMaxArmor() const;
|
||||
int GetHUDMaxHealth() const;
|
||||
void GetPrimaryHudColor(int& outR, int& outG, int& outB, bool inIgnoreUpgrades = false, bool gammaCorrect = true) const;
|
||||
float GetTimeOfLastUpdate() const;
|
||||
int GetMenuTechSlots() const;
|
||||
|
||||
//void GetVisibleBlips(VisibleBlipListType& outBlipList);
|
||||
|
||||
virtual int Redraw( float flTime, int intermission );
|
||||
virtual void ResetComponentsForUser3();
|
||||
void SetSelectingWeaponID(int inWeaponID, int inR = -1, int inG = -1, int inB = -1);
|
||||
void SetTechHelpText(const string& inTechHelpText);
|
||||
void DrawSelectionCircleOnGroundAtPoint(vec3_t inOrigin, int inRadius);
|
||||
// : 0000988
|
||||
void DrawBuildHealthEffectsForEntity(int inEntityIndex, float inAlpha = 1.0f);
|
||||
// :
|
||||
void DrawSelectionAndBuildEffects();
|
||||
void DrawHUDNumber(int inX, int inY, int inFlags, int inNumber);
|
||||
|
||||
int InitializeDemoPlayback(int inSize, unsigned char* inBuffer);
|
||||
int InitializeDemoPlayback2(int inSize, unsigned char* inBuffer);
|
||||
int InitializeWeaponInfoPlayback(int inSize, unsigned char* inBuffer);
|
||||
|
||||
virtual bool Update(float inCurrentTime, string& outErrorString);
|
||||
virtual void UpdateMusic(float inCurrentTime);
|
||||
|
||||
bool SlotInput(int inSlot);
|
||||
|
||||
const AvHMapExtents& GetMapExtents();
|
||||
float GetGammaSlope() const;
|
||||
string GetMapName(bool inLocalOnly = false) const;
|
||||
int GetMaxAlienResources() const;
|
||||
int GetNumActiveHives() const;
|
||||
void HideProgressStatus();
|
||||
void SetProgressStatus(float inPercentage, int inProgressbarType = 0);
|
||||
|
||||
AvHVisibleBlipList& GetEnemyBlipList();
|
||||
AvHVisibleBlipList& GetFriendlyBlipList();
|
||||
|
||||
AvHEntityHierarchy& GetEntityHierarchy();
|
||||
|
||||
int GetLocalUpgrades() const;
|
||||
string GetNameOfLocation(vec3_t inLocation) const;
|
||||
const AvHTechTree& GetTechNodes() const;
|
||||
|
||||
UIMode GetUIMode() const;
|
||||
bool SwitchUIMode(UIMode inNewMode);
|
||||
bool GetIsCombatMode() const;
|
||||
bool GetIsNSMode() const;
|
||||
|
||||
void HideResearchProgressStatus();
|
||||
void SetResearchProgressStatus(float inPercentage);
|
||||
|
||||
AvHMessageID GetGhostBuilding() const;
|
||||
void SetGhostBuildingMode(AvHMessageID inGhostBuilding);
|
||||
|
||||
void SetAlienAbility(AvHMessageID inAlienAbility);
|
||||
void SetRenderingSelectionView(bool inState);
|
||||
|
||||
void SetClientDebugCSP(weapon_data_t* inWeaponData, float inNextPlayerAttack);
|
||||
void SetCurrentWeaponData(int inCurrentWeaponID, bool inEnabled);
|
||||
int GetCurrentWeaponID(void);
|
||||
|
||||
void DrawTopDownBG();
|
||||
void DrawTranslatedString(int inX, int inY, const char* inStringToTranslate, bool inCentered = false, bool inIgnoreUpgrades = false, bool inTrimExtraInfo = false, float alpha = 1.0f);
|
||||
void HandleFog();
|
||||
void PostModelRender(char* inModelName);
|
||||
void PreRenderFrame();
|
||||
void PostRenderFrame();
|
||||
void RenderNoZBuffering();
|
||||
|
||||
void Render();
|
||||
void RenderCommonUI();
|
||||
void RenderMarineUI();
|
||||
void RenderCommanderUI();
|
||||
void RenderAlienUI();
|
||||
void RenderProgressBar(char *spriteName);
|
||||
void RenderMiniMap(int inX, int inY, int inWidth, int inHeight);
|
||||
|
||||
void RenderStructureRanges();
|
||||
void RenderStructureRange(vec3_t inOrigin, int inRadius, HSPRITE inSprite, int inRenderMode = kRenderNormal, int inFrame = 0, float inR = 0, float inG = 0.5, float inB = 0, float inAlpha = 1.0f);
|
||||
|
||||
void DrawWarpedOverlaySprite(int spriteHandle, int numXFrames, int numYFrames,
|
||||
float inWarpXAmount = 0.0f, float inWarpYAmount = 0.0f,
|
||||
float inWarpXSpeed = 0.0f, float inWarpYSpeed = 0.0f);
|
||||
|
||||
void DrawActionButtons();
|
||||
void DrawHotgroups();
|
||||
void DrawPendingRequests();
|
||||
|
||||
void SetCurrentUseableEnergyLevel(float inEnergyLevel);
|
||||
|
||||
// Network messages
|
||||
int MsgFunc_AlienInfo(const char* pszName, int iSize, void* pbuf);
|
||||
int MsgFunc_BlipList(const char* pszName, int iSize, void* pbuf);
|
||||
int MsgFunc_ClScript(const char *pszName, int iSize, void *pbuf);
|
||||
int MsgFunc_Countdown(const char* pszName, int iSize, void* pbuf);
|
||||
int MsgFunc_DebugCSP(const char* pszName, int iSize, void* pbuf);
|
||||
int MsgFunc_EditPS(const char* pszName, int iSize, void* pbuf);
|
||||
int MsgFunc_DelEntHier(const char *pszName, int iSize, void *pbuf);
|
||||
int MsgFunc_EntHier(const char *pszName, int iSize, void *pbuf);
|
||||
int MsgFunc_Fog(const char* pszName, int iSize, void* pbuf);
|
||||
int MsgFunc_SetUpgrades(const char* pszName, int iSize, void* pbuf);
|
||||
int MsgFunc_ListPS(const char* pszName, int iSize, void* pbuf);
|
||||
int MsgFunc_DelParts(const char *pszName, int iSize, void *pbuf);
|
||||
int MsgFunc_Particles(const char *pszName, int iSize, void *pbuf);
|
||||
int MsgFunc_SoundNames(const char *pszName, int iSize, void *pbuf);
|
||||
int MsgFunc_PlayHUDNot(const char* pszName, int iSize, void* pbuf);
|
||||
|
||||
int MsgFunc_BalanceVar(const char* pszName, int iSize, void* pbuf);
|
||||
int MsgFunc_ServerVar(const char* pszName, int iSize, void* pbuf);
|
||||
|
||||
int MsgFunc_GameStatus(const char* pszName, int iSize, void* pbuf);
|
||||
int MsgFunc_MiniMap(const char* pszName, int iSize, void* pbuf);
|
||||
// : 0000971
|
||||
int MsgFunc_IssueOrder(const char* pszName, int iSize, void* pbuf);
|
||||
// :
|
||||
int MsgFunc_Progress(const char* pszName, int iSize, void* pbuf);
|
||||
int MsgFunc_SetGmma(const char* pszName, int iSize, void* pbuf);
|
||||
int MsgFunc_SetSelect(const char* pszName, int iSize, void* pbuf);
|
||||
int MsgFunc_SetRequest(const char* pszName, int iSize, void* pbuf);
|
||||
int MsgFunc_SetOrder(const char* pszName, int iSize, void* pbuf);
|
||||
int MsgFunc_SetupMap(const char* pszName, int iSize, void* pbuf);
|
||||
int MsgFunc_SetTopDown(const char* pszName, int iSize, void* pbuf);
|
||||
int MsgFunc_SetTech(const char* pszName, int iSize, void* pbuf);
|
||||
int MsgFunc_TechSlots(const char* pszName, int iSize, void* pbuf);
|
||||
|
||||
void GetSpriteForUser3(AvHUser3 inUser3, int& outSprite, int& outFrame, int& outRenderMode);
|
||||
|
||||
int GetCurrentSquad() const;
|
||||
AvHOverviewMap& GetOverviewMap();
|
||||
|
||||
void ShowCrosshair();
|
||||
void HideCrosshair();
|
||||
|
||||
// This function should be used instead of the global SetCrosshair.
|
||||
void SetCurrentCrosshair(HSPRITE hspr, wrect_t rc, int r, int g, int b);
|
||||
|
||||
static void ResetGammaAtExit();
|
||||
static int ResetGammaAtExitForOnExit();
|
||||
static void ResetGammaAtExit(int inSig);
|
||||
|
||||
void SetViewport(const int inViewport[4]);
|
||||
void GetViewport(int outViewport[4]) const;
|
||||
|
||||
const AvHFont& GetSmallFont() const;
|
||||
cl_entity_s* GetVisiblePlayer() const;
|
||||
|
||||
float GetServerVariableFloat(const char* inName) const;
|
||||
|
||||
// :
|
||||
void SetCenterText(const char* inText);
|
||||
void DrawCenterText();
|
||||
void ClearCenterText();
|
||||
// :
|
||||
|
||||
private:
|
||||
|
||||
// :
|
||||
std::string mCenterText;
|
||||
float mCenterTextTime;
|
||||
// :
|
||||
|
||||
bool GetCommanderLabelText(std::string& outCommanderName) const;
|
||||
|
||||
void AddCommands();
|
||||
void ClearData();
|
||||
void DisplayCombatUpgradeMenu(bool inVisible);
|
||||
void DrawMouseCursor(int inBaseX, int inBaseY);
|
||||
void DrawOrders();
|
||||
void DrawHelpIcons();
|
||||
// : 0000971
|
||||
void GetOrderDirection(vec3_t inTarget, int inOrderType);
|
||||
void DrawTeammateOrders();
|
||||
// : 0000992
|
||||
void DrawDisplayOrder();
|
||||
void SetDisplayOrder(int inOrderType, int inOrderIndex, string inText1, string inText2, string inText3);
|
||||
// :
|
||||
void DrawHUDStructureNotification();
|
||||
void DrawInfoLocationText();
|
||||
void DrawPlayerNames();
|
||||
void DrawReticleInfo();
|
||||
void DrawToolTips();
|
||||
// : 0000971 -- added inAlpha
|
||||
void DrawWorldSprite(int inSpriteHandle, int inRenderMode, vec3_t inWorldPosition, int inFrame, float inWorldSize, float inAlpha = 1.0f);
|
||||
// :
|
||||
void DrawOrderIcon(const AvHOrder& inOrder);
|
||||
void DrawOrderText(const AvHOrder& inOrder);
|
||||
int GetFrameForOrderType(AvHOrderType inOrderType) const;
|
||||
void GetReticleTextDrawingInfo(float& outNormX, float& outNormY, bool& outCentered) const;
|
||||
void DrawTechTreeSprite(AvHMessageID inMessageID, int inPosX, int inPosY, int inWidth, int inHeight, int inFrame);
|
||||
int GetTechTreeSprite(AvHMessageID inMessageID);
|
||||
void GetTooltipDrawingInfo(float& outNormX, float& outNormY) const;
|
||||
string GetRankTitle(bool inShowUnspentLevels = false) const;
|
||||
bool GetShouldDisplayUser3(AvHUser3 inUser3) const;
|
||||
void InitCommanderMode();
|
||||
void InitializeDemoRecording();
|
||||
void InitMenu(const string& inMenuName);
|
||||
void ChangeUpgradeCosts(int inOldMessageID, int inNewMessageID, const char* inText);
|
||||
void ChangeUpgradeCostsForMenu(PieMenu* inMenu, int inOldMessageID, int inNewMessageID, const char* inText);
|
||||
void DisplayMessage(const char* inMessage);
|
||||
bool GetAmbientSoundNameFromIndex(string& outSoundName, int inSoundIndex) const;
|
||||
EntityListType GetDrawPlayerOrders() const;
|
||||
bool GetEntityInfoString(int inEntityID, string& outEntityInfoString, bool& outIsEnemy);
|
||||
void ModifyAmbientSoundEntryIfChanged(bool inSoundOn, int inSoundIndex, int inEntIndex, float inTimeStarted, int inVolume, int inFadeDistance, int inFlags, Vector inOrigin);
|
||||
void ResetTopDownUI();
|
||||
bool SetGamma(float inSlope);
|
||||
void SetReinforcements(int inReinforcements);
|
||||
void SetHelpMessage(const string& inHelpText, bool inForce = false, float inNormX = -1, float inNormY = -1);
|
||||
void SetActionButtonHelpMessage(const string& inHelpText);
|
||||
void SetReticleMessage(const string& inHelpText);
|
||||
void OrderNotification(const AvHOrder& inOrder);
|
||||
virtual void ResetGame(bool inMapChanged = false);
|
||||
|
||||
bool SetCursor(AvHOrderType inOrderType);
|
||||
void GetCursor(HSPRITE& outSprite, int& outFrame);
|
||||
|
||||
void SetSelectionEffects(EntityListType& inUnitList);
|
||||
//void UpdateSelectionEffects(float inTimePassed);
|
||||
void TraceEntityID(int& outEntityID);
|
||||
bool GetIsMouseInRegion(int inX, int inY, int inWidth, int inHeight);
|
||||
void GetMousePos(int& outX, int& outY) const;
|
||||
|
||||
// Help system
|
||||
void InternalHelpTextThink();
|
||||
bool ProcessAlien();
|
||||
bool ProcessAlienHelp();
|
||||
bool ProcessEntityHelp();
|
||||
bool ProcessGeneralHelp();
|
||||
bool ProcessOrderHelp();
|
||||
bool ProcessWeaponsHelp();
|
||||
|
||||
//void ResetUpgradeCosts();
|
||||
//void ResetUpgradeCostsForMenu(PieMenu* inMenu);
|
||||
void UpdateAlienUI(float inCurrentTime);
|
||||
void UpdateCommonUI();
|
||||
void UpdateDataFromVuser4(float inCurrentTime);
|
||||
void UpdateMarineUI(float inCurrentTime);
|
||||
void UpdateUpgradeCosts();
|
||||
void UpdateEnableState(PieMenu* inMenu);
|
||||
void UpdateCountdown(float inCurrentTime);
|
||||
void UpdateHierarchy();
|
||||
void UpdateInfoLocation();
|
||||
void UpdatePieMenuControl();
|
||||
void UpdateEntityID(float inCurrentTime);
|
||||
void UpdateTooltips(float inCurrentTime);
|
||||
void UpdateStructureNotification(float inCurrentTime);
|
||||
void UpdateProgressBar();
|
||||
void UpdateDemoRecordPlayback();
|
||||
void UpdateBuildingPlacement();
|
||||
void UpdateResources(float inTimePassed);
|
||||
void UpdateSelection();
|
||||
void UpdateSpectating();
|
||||
void UpdateBuildResearchText();
|
||||
void UpdateHelpText();
|
||||
void UpdateTechNodes();
|
||||
void UpdateAmbientSounds();
|
||||
void UpdateFromEntities(float inCurrentTime);
|
||||
void UpdateViewModelEffects();
|
||||
|
||||
int mResources;
|
||||
int mUser2OfLastResourceMessage;
|
||||
int mMaxResources;
|
||||
int mVisualResources;
|
||||
float mExperience;
|
||||
int mExperienceLevel;
|
||||
int mExperienceLevelLastDrawn;
|
||||
int mExperienceLevelSpent;
|
||||
float mTimeOfLastLevelUp;
|
||||
AvHMessageID mMenuImpulses[kNumUpgradeLines];
|
||||
|
||||
float mCountDownClock;
|
||||
int mLastTickPlayed;
|
||||
int mNumTicksToPlay;
|
||||
float mTimeOfLastUpdate;
|
||||
float mTimeOfNextHudSound;
|
||||
AvHHUDSound mLastHUDSoundPlayed;
|
||||
float mTimeOfCurrentUpdate;
|
||||
|
||||
AvHOverviewMap mOverviewMap;
|
||||
|
||||
AvHTeamHierarchy* mHierarchy;
|
||||
AvHTeamHierarchy* mShowMapHierarchy;
|
||||
AvHEntityHierarchy mEntityHierarchy;
|
||||
|
||||
EntityListType mSelected;
|
||||
EntityListType mGroups[kNumHotkeyGroups];
|
||||
EntityListType mSelectAllGroup;
|
||||
AvHUser3 mGroupTypes[kNumHotkeyGroups];
|
||||
AvHAlertType mGroupAlerts[kNumHotkeyGroups];
|
||||
|
||||
typedef map<AvHMessageID, int> PendingRequestListType;
|
||||
PendingRequestListType mPendingRequests;
|
||||
|
||||
AvHUser3 mLastUser3;
|
||||
AvHTeamNumber mLastTeamNumber;
|
||||
AvHPlayMode mLastPlayMode;
|
||||
|
||||
bool mSelectionJustChanged;
|
||||
bool mMouseOneDown;
|
||||
bool mMouseTwoDown;
|
||||
int mMouseOneStartX;
|
||||
int mMouseOneStartY;
|
||||
bool mLeftMouseStarted;
|
||||
bool mLeftMouseEnded;
|
||||
bool mPlacingBuilding;
|
||||
int mMouseTwoStartX;
|
||||
int mMouseTwoStartY;
|
||||
bool mRightMouseStarted;
|
||||
bool mRightMouseEnded;
|
||||
vec3_t mMouseWorldPosition;
|
||||
vec3_t mLeftMouseWorldStart;
|
||||
vec3_t mLeftMouseWorldEnd;
|
||||
vec3_t mRightMouseWorldStart;
|
||||
vec3_t mRightMouseWorldEnd;
|
||||
MarqueeComponent* mSelectionBox;
|
||||
int mMouseCursorX;
|
||||
int mMouseCursorY;
|
||||
string mPieMenuControl;
|
||||
|
||||
OrderListType mOrders;
|
||||
//AvHOrderType mOrderMode;
|
||||
|
||||
// : 0000971
|
||||
map< int, TeammateOrderType > mTeammateOrder;
|
||||
// : 0000992
|
||||
float mDisplayOrderTime;
|
||||
int mDisplayOrderType;
|
||||
int mDisplayOrderDirection;
|
||||
int mDisplayOrderIndex;
|
||||
string mDisplayOrderText1;
|
||||
string mDisplayOrderText2;
|
||||
string mDisplayOrderText3;
|
||||
int mCurrentOrderTarget;
|
||||
int mCurrentOrderType;
|
||||
float mCurrentOrderTime;
|
||||
// :
|
||||
AvHMessageID mTechEvent;
|
||||
AvHMessageID mAlienAbility;
|
||||
AvHMessageID mGroupEvent;
|
||||
AvHMessageID mLastHotkeySelectionEvent;
|
||||
int mTrackingEntity;
|
||||
|
||||
AvHAlienUpgradeListType mUpgrades;
|
||||
AvHAlienUpgradeCategory mCurrentUpgradeCategory[ALIEN_UPGRADE_CATEGORY_MAX_PLUS_ONE];
|
||||
int mNumUpgradesAvailable;
|
||||
|
||||
Label* mCommanderResourceLabel;
|
||||
Label* mOverwatchRangeLabel;
|
||||
ProgressBar* mGenericProgressBar;
|
||||
ProgressBar* mResearchProgressBar;
|
||||
ProgressBar* mAlienProgressBar;
|
||||
Label* mResearchLabel;
|
||||
string mPreviousHelpText;
|
||||
float mTimeLastHelpTextChanged;
|
||||
|
||||
int mNumMovement;
|
||||
int mNumSensory;
|
||||
int mNumDefense;
|
||||
|
||||
bool mHasGrenades;
|
||||
bool mHasWelder;
|
||||
bool mHasMines;
|
||||
|
||||
int mSelectedNodeResourceCost;
|
||||
float mCurrentUseableEnergyLevel;
|
||||
float mVisualEnergyLevel;
|
||||
int mUser2OfLastEnergyLevel;
|
||||
|
||||
static void PlayRandomSongHook();
|
||||
static void ShowMap();
|
||||
static void HideMap();
|
||||
|
||||
static void ShowCommandMenu();
|
||||
static void HideCommandMenu();
|
||||
|
||||
float mTimeLastOverwatchPulse;
|
||||
bool mInTopDownMode;
|
||||
int mNumLocalSelectEvents;
|
||||
AvHMapMode mMapMode;
|
||||
//@2014 make this work for linux
|
||||
static GammaTable sPregameGammaTable;
|
||||
static GammaTable sGameGammaTable;
|
||||
|
||||
|
||||
float mDesiredGammaSlope;
|
||||
|
||||
typedef vector<AvHAmbientSound> AmbientSoundListType;
|
||||
AmbientSoundListType mAmbientSounds;
|
||||
|
||||
AvHTechTree mTechNodes;
|
||||
|
||||
string mMapName;
|
||||
AvHMapExtents mMapExtents;
|
||||
|
||||
// If this isn't MESSAGE_NULL, it means we are trying to build a building of this tech
|
||||
AvHMessageID mGhostBuilding;
|
||||
AvHMessageID mValidatedBuilding;
|
||||
bool mCreatedGhost;
|
||||
bool mCancelBuilding;
|
||||
bool mCurrentGhostIsValid;
|
||||
vec3_t mNormBuildLocation;
|
||||
vec3_t mGhostWorldLocation;
|
||||
|
||||
// Added by mmcguire.
|
||||
int mSelectionBoxX1;
|
||||
int mSelectionBoxY1;
|
||||
int mSelectionBoxX2;
|
||||
int mSelectionBoxY2;
|
||||
bool mSelectionBoxVisible;
|
||||
|
||||
Vector mCommanderPAS;
|
||||
|
||||
StringList mSoundNameList;
|
||||
|
||||
AvHVisibleBlipList mEnemyBlips;
|
||||
AvHVisibleBlipList mFriendlyBlips;
|
||||
|
||||
bool mMarineUIDrawUI;
|
||||
HSPRITE mMarineUIJetpackSprite;
|
||||
|
||||
HSPRITE mAlienUIEnergySprite;
|
||||
HSPRITE mAlienUICloakSprite;
|
||||
|
||||
HSPRITE mMembraneSprite;
|
||||
HSPRITE mDigestingSprite;
|
||||
HSPRITE mBackgroundSprite;
|
||||
HSPRITE mTopDownTopSprite;
|
||||
HSPRITE mTopDownBottomSprite;
|
||||
HSPRITE mMarineTopSprite;
|
||||
HSPRITE mLogoutSprite;
|
||||
HSPRITE mCommandButtonSprite;
|
||||
HSPRITE mCommandStatusSprite;
|
||||
HSPRITE mSelectAllSprite;
|
||||
|
||||
HSPRITE mMarineOrderIndicator;
|
||||
HSPRITE mMarineUpgradesSprite;
|
||||
|
||||
// : 0000971
|
||||
HSPRITE mTeammateOrderSprite;
|
||||
// :
|
||||
typedef map<int, int> SpriteListType;
|
||||
SpriteListType mActionButtonSprites;
|
||||
//SpriteListType mHelpSprites;
|
||||
int mHelpSprite;
|
||||
|
||||
typedef vector< pair<vec3_t, int> > HelpIconListType;
|
||||
HelpIconListType mHelpIcons;
|
||||
EntityListType mHelpEnts;
|
||||
|
||||
EntityListType mBuildingEffectsEntityList;
|
||||
float mTimeOfLastEntityUpdate;
|
||||
|
||||
HSPRITE mAlienUIUpgrades;
|
||||
HSPRITE mAlienUIUpgradeCategories;
|
||||
|
||||
HSPRITE mAlienBuildSprite;
|
||||
HSPRITE mMarineBuildSprite;
|
||||
|
||||
HSPRITE mAlienHealthSprite;
|
||||
HSPRITE mMarineHealthSprite;
|
||||
|
||||
HSPRITE mHealthEffectsSprite;
|
||||
HSPRITE mBuildCircleSprite;
|
||||
//HSPRITE mSiegeTurretSprite;
|
||||
SelectionListType mSelectionEffects;
|
||||
|
||||
|
||||
//HSPRITE mMappingTechSprite;
|
||||
|
||||
HSPRITE mHiveInfoSprite;
|
||||
HSPRITE mHiveHealthSprite;
|
||||
HSPRITE mOrderSprite;
|
||||
HSPRITE mCursorSprite;
|
||||
HSPRITE mMarineCursor;
|
||||
HSPRITE mAlienCursor;
|
||||
HSPRITE mAlienLifeformsCursor;
|
||||
int mCurrentCursorFrame;
|
||||
|
||||
int mProgressBarEntityIndex;
|
||||
int mProgressBarParam;
|
||||
int mProgressBarCompleted;
|
||||
float mProgressBarStatus;
|
||||
float mProgressBarLastDrawn;
|
||||
int mProgressBarDrawframe;
|
||||
|
||||
bool mFogActive;
|
||||
vec3_t mFogColor;
|
||||
float mFogStart;
|
||||
float mFogEnd;
|
||||
|
||||
HSPRITE mExperienceBarSprite;
|
||||
HSPRITE mProgressBarSprite;
|
||||
|
||||
AvHBaseInfoLocationListType mInfoLocationList;
|
||||
string mLocationText;
|
||||
|
||||
string mReticleInfoText;
|
||||
//int mReticleInfoColorR;
|
||||
//int mReticleInfoColorG;
|
||||
//int mReticleInfoColorB;
|
||||
//float mReticleInfoColorA;
|
||||
//int mReticleInfoScreenX;
|
||||
//int mReticleInfoScreenY;
|
||||
int mSelectingWeaponID;
|
||||
string mTechHelpText;
|
||||
AvHMessageID mSelectingNodeID;
|
||||
|
||||
struct tempent_s* mLastGhostBuilding;
|
||||
|
||||
typedef vector<NumericalInfoEffect> NumericalInfoEffectListType;
|
||||
NumericalInfoEffectListType mNumericalInfoEffects;
|
||||
|
||||
AvHTooltip mHelpMessage;
|
||||
AvHTooltip mReticleMessage;
|
||||
AvHTooltip mTopDownPlayerNameMessage;
|
||||
AvHTooltip mTopDownActionButtonHelp;
|
||||
AvHTooltip mCombatUpgradeMenu;
|
||||
bool mDrawCombatUpgradeMenu;
|
||||
|
||||
typedef vector<AvHTooltip> AvHTooltipListType;
|
||||
AvHTooltipListType mTooltips;
|
||||
|
||||
HiveInfoListType mHiveInfoList;
|
||||
|
||||
bool mRecordingLastFrame;
|
||||
|
||||
float mTimeOfLastHelpText;
|
||||
StringList mDisplayedToolTipList;
|
||||
|
||||
int mCurrentWeaponID;
|
||||
bool mCurrentWeaponEnabled;
|
||||
|
||||
AvHTechSlotManager mTechSlotManager;
|
||||
UIMode mCurrentUIMode;
|
||||
|
||||
int mMenuTechSlots;
|
||||
int mCurrentSquad;
|
||||
int mBlinkingAlertType;
|
||||
|
||||
float mGameTime;
|
||||
int mTimeLimit;
|
||||
int mCombatAttackingTeamNumber;
|
||||
bool mGameStarted;
|
||||
bool mGameEnded;
|
||||
|
||||
AvHTeamNumber mLastTeamSpectated;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
AvHMessageID mStructureID;
|
||||
float mTime;
|
||||
int mPlayerIndex;
|
||||
Vector mLocation;
|
||||
} HUDNotificationType;
|
||||
|
||||
typedef vector< HUDNotificationType > StructureHUDNotificationListType;
|
||||
StructureHUDNotificationListType mStructureNotificationList;
|
||||
|
||||
int mCrosshairShowCount;
|
||||
HSPRITE mCrosshairSprite;
|
||||
wrect_t mCrosshairRect;
|
||||
int mCrosshairR;
|
||||
int mCrosshairG;
|
||||
int mCrosshairB;
|
||||
|
||||
int mViewport[4]; // the viewport coordinates x ,y , width, height
|
||||
int mSpecialViewport[4]; // the viewport coordinates x ,y , width, height
|
||||
|
||||
bool mSteamUIActive;
|
||||
|
||||
typedef std::map<std::string, int> ServerVariableMapType;
|
||||
ServerVariableMapType mServerVariableMap;
|
||||
|
||||
static bool sShowMap;
|
||||
|
||||
};
|
||||
|
||||
#endif
|
|
@ -12,6 +12,9 @@
|
|||
//
|
||||
//-------------------------------------------------------------------------------
|
||||
// $Log: AvHMarineEquipment.cpp,v $
|
||||
// Revision 1.51 2015/12/03 fmoraw
|
||||
// - observatory detection method no longer uses vector2d
|
||||
//
|
||||
// Revision 1.50 2002/11/22 21:28:16 Flayra
|
||||
// - mp_consistency changes
|
||||
//
|
||||
|
@ -2414,7 +2417,7 @@ void AvHObservatory::ObservatoryThink()
|
|||
if(theEntity->GetIsRelevant() && (theEntity->pev->team != this->pev->team))
|
||||
{
|
||||
// Check that entity is in range of scan
|
||||
float theDistance = VectorDistance2D(theEntity->pev->origin, this->pev->origin);
|
||||
float theDistance = VectorDistance(theEntity->pev->origin, this->pev->origin);
|
||||
if(theDistance < BALANCE_VAR(kObservatoryXYDetectionRadius))
|
||||
{
|
||||
// Remove cloaking, if player has it
|
||||
|
|
|
@ -54,7 +54,7 @@
|
|||
#include "../engine/cdll_int.h"
|
||||
#include "../common/event_api.h"
|
||||
#include "../common/cl_entity.h"
|
||||
#include <particledefs.h>
|
||||
#include <particledefs.h>
|
||||
#include <p_vector.h>
|
||||
#include "../common/usercmd.h"
|
||||
#include "../pm_shared/pm_shared.h"
|
||||
|
@ -1124,6 +1124,4 @@ AvHParticleSystem::UpdateFirst()
|
|||
//// this->mBaseEntityPos.y = this->mOrigin[1];
|
||||
//// this->mBaseEntityPos.z = this->mOrigin[2];
|
||||
//// }
|
||||
//}
|
||||
|
||||
|
||||
//}
|
|
@ -39,9 +39,7 @@
|
|||
//===============================================================================
|
||||
#include "AvHParticleSystem.h"
|
||||
#include "AvHParticleTemplate.h"
|
||||
#include "winsani_in.h"
|
||||
#include <papi.h>
|
||||
#include "winsani_out.h"
|
||||
|
||||
#ifdef AVH_CLIENT
|
||||
#include "cl_dll/cl_util.h"
|
||||
|
@ -50,16 +48,16 @@
|
|||
#include "../common/const.h"
|
||||
#include "../engine/progdefs.h"
|
||||
#include "../engine/edict.h"
|
||||
#include "../pm_shared/pm_defs.h"
|
||||
#include "pm_shared/pm_defs.h"
|
||||
#include "../engine/cdll_int.h"
|
||||
#include "../common/event_api.h"
|
||||
#include "../common/cl_entity.h"
|
||||
// #include <particledefs.h> //@2014 already included via <papi.h>
|
||||
#include <p_vector.h>
|
||||
#include "../common/usercmd.h"
|
||||
#include "../pm_shared/pm_shared.h"
|
||||
#include "../pm_shared/pm_movevars.h"
|
||||
#include "../pm_shared/pm_debug.h"
|
||||
#include "pm_shared/pm_shared.h"
|
||||
#include "pm_shared/pm_movevars.h"
|
||||
#include "pm_shared/pm_debug.h"
|
||||
#include "AvHParticleSystemManager.h"
|
||||
#include "cl_dll/ev_hldm.h"
|
||||
#include "AvHParticleTemplateClient.h"
|
||||
|
|
|
@ -8034,7 +8034,6 @@ void AvHPlayer::SetUser3(AvHUser3 inUser3, bool inForceChange, bool inGiveWeapon
|
|||
mSavedJetpackEnergy = this->pev->fuser3;
|
||||
|
||||
this->ClearUserVariables();
|
||||
|
||||
switch(inUser3)
|
||||
{
|
||||
case AVH_USER3_NONE:
|
||||
|
@ -8413,7 +8412,6 @@ void AvHPlayer::StartTopDownMode()
|
|||
// GetGameRules()->GetMapExtents(theMinViewHeight, theMaxViewHeight, theMinX, theMinY, theMaxX, theMaxY, theDrawMapBG);
|
||||
|
||||
this->pev->origin.z = GetGameRules()->GetMapExtents().GetMaxViewHeight();
|
||||
|
||||
this->mInTopDownMode = true;
|
||||
|
||||
// Cheesy way to make sure player class change is sent to everyone
|
||||
|
|
|
@ -11,7 +11,9 @@
|
|||
// $Date: $
|
||||
//
|
||||
//-------------------------------------------------------------------------------
|
||||
// $Log: $
|
||||
// $Log: AvHWorldUpdate.cpp $
|
||||
// 2015/12/02 fmoraw
|
||||
// - removed infinite detection range of the observatory on the z axis
|
||||
//===============================================================================
|
||||
#include "../util/nowarnings.h"
|
||||
#include "../dlls/extdll.h"
|
||||
|
@ -98,7 +100,7 @@ bool AvHSUGetInViewOfEnemy(CBaseEntity* inEntity, int& outSightedStatus)
|
|||
if((*theObservatoryIter)->pev->team != inEntity->pev->team && ( inEntity->pev->team != TEAM_IND ) && !(*theObservatoryIter)->GetIsRecycling() )
|
||||
{
|
||||
// Check that entity is in range of scan (only check XY distance, for commander's purposes)
|
||||
float theDistance = VectorDistance2D((*theObservatoryIter)->pev->origin, inEntity->pev->origin);
|
||||
float theDistance = VectorDistance((*theObservatoryIter)->pev->origin, inEntity->pev->origin);
|
||||
if(theDistance < BALANCE_VAR(kObservatoryXYDetectionRadius))
|
||||
{
|
||||
outSightedStatus |= MASK_VIS_DETECTED;
|
||||
|
|
|
@ -19,7 +19,7 @@ CFLAGS = $(COPT) $(COMPFLAGS) -I. -I.. -I$(GLUT_HOME)/include -I/usr/include/c++
|
|||
|
||||
POBJS =action_api.o actions.o HLRender.o opengl.o system.o
|
||||
|
||||
ALL = libparticleMP.a SPDir
|
||||
ALL = libparticleMP.a
|
||||
|
||||
all: $(ALL)
|
||||
|
||||
|
@ -34,10 +34,9 @@ libparticleMP.a: $(POBJS)
|
|||
ar clq $@ $(POBJS)
|
||||
|
||||
SPDir:
|
||||
(cd SP ; smake)
|
||||
(make)
|
||||
|
||||
clean:
|
||||
(cd SP ; smake clean)
|
||||
rm -f libpar*
|
||||
rm -f *.o
|
||||
rm -rf *ii_files
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
For SGI we make a version of the library that's made for
|
||||
multiprocessing in this directory and a version that's made for single
|
||||
processing in the SP directory. Typing make in this directory will make both.
|
||||
|
|
@ -9,12 +9,13 @@
|
|||
|
||||
#include "papi.h"
|
||||
#include "p_vector.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning (disable:4244)
|
||||
#endif
|
||||
|
||||
#ifdef _WIN32
|
||||
#pragma warning (disable:4244)
|
||||
#endif
|
||||
|
||||
// A single particle
|
||||
/*
|
||||
struct Particle
|
||||
{
|
||||
pVector pos;
|
||||
|
@ -61,7 +62,7 @@ struct ParticleGroup
|
|||
return true;
|
||||
}
|
||||
}
|
||||
};
|
||||
};*/
|
||||
|
||||
struct pDomain
|
||||
{
|
||||
|
|
Binary file not shown.
|
@ -9,7 +9,8 @@
|
|||
#define _particle_api_h
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <p_vector.h>
|
||||
#include <general.h>
|
||||
// This is the major and minor version number of this release of the API.
|
||||
#define P_VERSION 120
|
||||
|
||||
|
@ -23,7 +24,7 @@
|
|||
#endif
|
||||
|
||||
#else
|
||||
#define PARTICLEDLL_API
|
||||
#define PARTICLEDLL_API extern "C"
|
||||
#endif
|
||||
|
||||
// Actually this must be < sqrt(MAXFLOAT) since we store this value squared.
|
||||
|
|
|
@ -12,24 +12,28 @@
|
|||
#include <iostream>
|
||||
// using namespace std;
|
||||
|
||||
// <<< cgc >>> removed DllMain() because I'm linking statically
|
||||
// For Windows DLL.
|
||||
#ifdef WIN32
|
||||
BOOL APIENTRY DllMain( HANDLE hModule,
|
||||
DWORD ul_reason_for_call,
|
||||
LPVOID lpReserved
|
||||
)
|
||||
{
|
||||
switch (ul_reason_for_call)
|
||||
{
|
||||
case DLL_PROCESS_ATTACH:
|
||||
case DLL_THREAD_ATTACH:
|
||||
case DLL_THREAD_DETACH:
|
||||
case DLL_PROCESS_DETACH:
|
||||
break;
|
||||
}
|
||||
return TRUE;
|
||||
}
|
||||
#endif
|
||||
//#ifdef WIN32
|
||||
//BOOL APIENTRY DllMain( HANDLE hModule,
|
||||
// DWORD ul_reason_for_call,
|
||||
// LPVOID lpReserved
|
||||
// )
|
||||
//{
|
||||
// switch (ul_reason_for_call)
|
||||
// {
|
||||
// case DLL_PROCESS_ATTACH:
|
||||
// case DLL_THREAD_ATTACH:
|
||||
// case DLL_THREAD_DETACH:
|
||||
// case DLL_PROCESS_DETACH:
|
||||
// break;
|
||||
// }
|
||||
// return TRUE;
|
||||
//}
|
||||
//#endif
|
||||
|
||||
// <<< cgc >>> added this pre-declaration
|
||||
extern void _pSendAction(ParticleAction *S, PActionEnum type, int size);
|
||||
|
||||
float ParticleAction::dt;
|
||||
|
||||
|
@ -604,7 +608,8 @@ PARTICLEDLL_API void pCallActionList(int action_list_num)
|
|||
if(_ps.in_new_list)
|
||||
{
|
||||
// Add this call as an action to the current list.
|
||||
extern void _pSendAction(ParticleAction *S, PActionEnum type, int size);
|
||||
// <<< cgc >>> commented out predeclaration
|
||||
//void _pSendAction(ParticleAction *S, PActionEnum type, int size);
|
||||
|
||||
PACallActionList S;
|
||||
S.action_list_num = action_list_num;
|
||||
|
@ -704,6 +709,13 @@ PARTICLEDLL_API void pCurrentGroup(int p_group_num)
|
|||
_ps.group_id = -1;
|
||||
}
|
||||
|
||||
PARTICLEDLL_API ParticleGroup* pGetCurrentGroup(void)
|
||||
{
|
||||
_ParticleState &_ps = _GetPState();
|
||||
ParticleGroup *pg = _ps.pgrp;
|
||||
return pg;
|
||||
}
|
||||
|
||||
// Change the maximum number of particles in the current group.
|
||||
PARTICLEDLL_API int pSetMaxParticles(int max_count)
|
||||
{
|
||||
|
@ -797,6 +809,19 @@ PARTICLEDLL_API void pCopyGroup(int p_src_group_num, int index, int copy_count)
|
|||
destgrp->p_count += ccount;
|
||||
}
|
||||
|
||||
PARTICLEDLL_API ParticleGroup* pGetParticleGroupRef(int p_group_num)
|
||||
{
|
||||
ParticleGroup* theGroup = NULL;
|
||||
|
||||
_ParticleState &_ps = _GetPState();
|
||||
|
||||
if(!_ps.in_new_list)
|
||||
{
|
||||
theGroup = _ps.GetGroupPtr(p_group_num);
|
||||
}
|
||||
return theGroup;
|
||||
}
|
||||
|
||||
// Copy from the current group to application memory.
|
||||
PARTICLEDLL_API int pGetParticles(int index, int count, float *verts,
|
||||
float *color, float *vel, float *size, float *age)
|
||||
|
|
|
@ -19,7 +19,7 @@ CFLAGS = $(COPT) $(COMPFLAGS) -I. -I.. -I$(GLUT_HOME)/include -I/usr/include/c++
|
|||
|
||||
POBJS =action_api.o actions.o HLRender.o opengl.o system.o
|
||||
|
||||
ALL = libparticleMP.a SPDir
|
||||
ALL = libparticleMP.a
|
||||
|
||||
all: $(ALL)
|
||||
|
||||
|
@ -34,10 +34,9 @@ libparticleMP.a: $(POBJS)
|
|||
ar clq $@ $(POBJS)
|
||||
|
||||
SPDir:
|
||||
(cd SP ; smake)
|
||||
(make)
|
||||
|
||||
clean:
|
||||
(cd SP ; smake clean)
|
||||
rm -f libpar*
|
||||
rm -f *.o
|
||||
rm -rf *ii_files
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
#v4.0:v100
|
||||
Release|Win32|C:\Users\fabian\Downloads\NS\main\source\particles\|
|
Binary file not shown.
Binary file not shown.
|
@ -18,6 +18,9 @@
|
|||
#include "const.h"
|
||||
#include <math.h>
|
||||
|
||||
float AngleBetweenVectors( float * v1, float * v2 );
|
||||
void InterpolateAngles( float *start, float *end, float *output, float frac );
|
||||
|
||||
// up / down
|
||||
#define PITCH 0
|
||||
// left / right
|
||||
|
@ -170,84 +173,6 @@ void AngleIMatrix (const vec3_t angles, float matrix[3][4] )
|
|||
}
|
||||
#endif
|
||||
|
||||
void NormalizeAngles( float *angles )
|
||||
{
|
||||
int i;
|
||||
// Normalize angles
|
||||
for ( i = 0; i < 3; i++ )
|
||||
{
|
||||
if ( angles[i] > 180.0 )
|
||||
{
|
||||
angles[i] -= 360.0;
|
||||
}
|
||||
else if ( angles[i] < -180.0 )
|
||||
{
|
||||
angles[i] += 360.0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
===================
|
||||
InterpolateAngles
|
||||
|
||||
Interpolate Euler angles.
|
||||
FIXME: Use Quaternions to avoid discontinuities
|
||||
Frac is 0.0 to 1.0 ( i.e., should probably be clamped, but doesn't have to be )
|
||||
===================
|
||||
*/
|
||||
void InterpolateAngles( float *start, float *end, float *output, float frac )
|
||||
{
|
||||
int i;
|
||||
float ang1, ang2;
|
||||
float d;
|
||||
|
||||
NormalizeAngles( start );
|
||||
NormalizeAngles( end );
|
||||
|
||||
for ( i = 0 ; i < 3 ; i++ )
|
||||
{
|
||||
ang1 = start[i];
|
||||
ang2 = end[i];
|
||||
|
||||
d = ang2 - ang1;
|
||||
if ( d > 180 )
|
||||
{
|
||||
d -= 360;
|
||||
}
|
||||
else if ( d < -180 )
|
||||
{
|
||||
d += 360;
|
||||
}
|
||||
|
||||
output[i] = ang1 + d * frac;
|
||||
}
|
||||
|
||||
NormalizeAngles( output );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
===================
|
||||
AngleBetweenVectors
|
||||
|
||||
===================
|
||||
*/
|
||||
float AngleBetweenVectors( const vec3_t v1, const vec3_t v2 )
|
||||
{
|
||||
float angle;
|
||||
float l1 = Length( v1 );
|
||||
float l2 = Length( v2 );
|
||||
|
||||
if ( !l1 || !l2 )
|
||||
return 0.0f;
|
||||
|
||||
angle = acos( DotProduct( v1, v2 ) ) / (l1*l2);
|
||||
angle = ( angle * 180.0f ) / M_PI;
|
||||
|
||||
return angle;
|
||||
}
|
||||
|
||||
#ifndef DISABLE_VEC_FUNCS
|
||||
void VectorTransform (const vec3_t in1, float in2[3][4], vec3_t out)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// Copyright (c) 1999, Valve LLC. All rights reserved.
|
||||
//Copyright (c) 1999, Valve LLC. All rights reserved.
|
||||
//
|
||||
// This product contains software technology licensed from Id
|
||||
// Software, Inc. ("Id Technology"). Id Technology (c) 1996 Id Software, Inc.
|
||||
|
@ -182,7 +182,7 @@ float gTopDownViewAngles[3];
|
|||
|
||||
static int pm_shared_initialized = 0;
|
||||
|
||||
void InterpolateAngles( float *start, float *end, float *output, float frac );
|
||||
//void InterpolateAngles( float *start, float *end, float *output, float frac );
|
||||
|
||||
#pragma warning( disable : 4305 )
|
||||
|
||||
|
@ -6076,11 +6076,11 @@ bool PM_TopDown()
|
|||
|
||||
//theMaxZ = min(theMaxZ, theNewStartPos[2]);
|
||||
|
||||
#ifdef AVH_CLIENT /*
|
||||
extern DebugPointListType gSquareDebugLocations;
|
||||
DebugPoint theDebugPoint(theNewStartPos[0], theNewStartPos[1], theMaxZ - theNewStartPos[2]);
|
||||
gSquareDebugLocations.push_back(theDebugPoint);*/
|
||||
#endif
|
||||
//#ifdef AVH_CLIENT /*
|
||||
//extern DebugPointListType gSquareDebugLocations;
|
||||
//DebugPoint theDebugPoint(theNewStartPos[0], theNewStartPos[1], theMaxZ - theNewStartPos[2]);
|
||||
//gSquareDebugLocations.push_back(theDebugPoint);*/
|
||||
//#endif
|
||||
|
||||
float speed, drop, friction, control, newspeed;
|
||||
float currentspeed, addspeed, accelspeed;
|
||||
|
@ -6222,8 +6222,8 @@ bool PM_TopDown()
|
|||
theAngles[2] = kTopDownRoll;
|
||||
|
||||
// Set angles facing down so observer knows which way to point
|
||||
VectorCopy(theAngles, pmove->angles);
|
||||
|
||||
VectorCopy(theAngles,pmove->angles);
|
||||
|
||||
// Set origin
|
||||
//pmove->origin[2] = 1080;
|
||||
//pmove->origin[2] = PM_GetDesiredTopDownCameraHeight();
|
||||
|
|
|
@ -1,3 +0,0 @@
|
|||
@echo off
|
||||
pscp NS-server-src.zip flayra@www.jarhedz.com:/home/flayra/build/
|
||||
|
|
@ -3,7 +3,6 @@
|
|||
#include "VGUI_App.h"
|
||||
#include "cl_dll/hud.h"
|
||||
#include <string.h>
|
||||
#include <SDL2/SDL.h>
|
||||
#ifdef _WIN32
|
||||
#include "winsani_in.h"
|
||||
#include <windows.h>
|
||||
|
@ -48,17 +47,17 @@ void ChatPanel::CancelChat()
|
|||
void ChatPanel::KeyDown(int virtualKey, int scanCode)
|
||||
//void ChatPanel:VGUI::isKeyDown(KeyCode code)
|
||||
{
|
||||
sprintf(virtualKey,"%s");
|
||||
|
||||
if (virtualKey >= 0 && virtualKey < 256)
|
||||
{
|
||||
mKeyPushed[virtualKey] = true;
|
||||
}
|
||||
|
||||
if (virtualKey == SDLK_ESCAPE)
|
||||
if (virtualKey == KEY_ESCAPE)
|
||||
{
|
||||
CancelChat();
|
||||
}
|
||||
else if (virtualKey ==SDLK_RETURN/*VK_RETURN*/)
|
||||
else if (virtualKey == KEY_ENTER/*VK_RETURN*/)
|
||||
{
|
||||
|
||||
std::string theCommand;
|
||||
|
|
|
@ -1,196 +0,0 @@
|
|||
#include "ChatPanel.h"
|
||||
#include "VGUI_KeyCode.h"
|
||||
#include "VGUI_App.h"
|
||||
#include "cl_dll/hud.h"
|
||||
#include <string.h>
|
||||
#include <SDL2.h>
|
||||
#ifdef _WIN32
|
||||
#include "winsani_in.h"
|
||||
#include <windows.h>
|
||||
#include "winsani_out.h"
|
||||
#endif
|
||||
|
||||
|
||||
using namespace vgui;
|
||||
|
||||
const char* ChatPanel::chatModeAll = "say";
|
||||
const char* ChatPanel::chatModeTeam = "say_team";
|
||||
|
||||
ChatPanel::ChatPanel(int x, int y, int wide, int tall)
|
||||
: Panel(x, y, wide, tall)
|
||||
{
|
||||
|
||||
for (int i = 0; i < 256; ++i)
|
||||
{
|
||||
mKeyPushed[i] = false;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void ChatPanel::SetChatMode(string sChatMode)
|
||||
{
|
||||
mChatMode = sChatMode;
|
||||
}
|
||||
|
||||
void ChatPanel::CancelChat()
|
||||
{
|
||||
|
||||
mText = "";
|
||||
setVisible(false);
|
||||
|
||||
for (int i = 0; i < 256; ++i)
|
||||
{
|
||||
mKeyPushed[i] = false;
|
||||
}
|
||||
|
||||
}
|
||||
//@2014 so many evil inputs
|
||||
void ChatPanel::KeyDown(int virtualKey, int scanCode)
|
||||
//void ChatPanel:VGUI::isKeyDown(KeyCode code)
|
||||
{
|
||||
|
||||
if (virtualKey >= 0 && virtualKey < 256)
|
||||
{
|
||||
mKeyPushed[virtualKey] = true;
|
||||
}
|
||||
|
||||
if (virtualKey == SDLK_ESCAPE)
|
||||
{
|
||||
CancelChat();
|
||||
}
|
||||
else if (virtualKey ==SDLK_RETURN/*VK_RETURN*/)
|
||||
{
|
||||
|
||||
std::string theCommand;
|
||||
|
||||
theCommand += mChatMode;
|
||||
|
||||
theCommand += " \"";
|
||||
|
||||
// Replace all ';' characters with ':' characters since we can't have
|
||||
// ';' characters on a console message.
|
||||
|
||||
for (unsigned int i = 0; i < mText.length(); ++i)
|
||||
{
|
||||
if (mText[i] == ';')
|
||||
{
|
||||
mText[i] = ':';
|
||||
}
|
||||
}
|
||||
|
||||
theCommand += mText;
|
||||
|
||||
theCommand += "\"";
|
||||
|
||||
//say_x "the message here" instead of
|
||||
//say_x the message here (ever word was treated as another argument)
|
||||
gEngfuncs.pfnClientCmd((char*)theCommand.c_str());
|
||||
|
||||
CancelChat();
|
||||
|
||||
}
|
||||
else if (virtualKey == KEY_BACKSPACE/*VK_BACK*/)
|
||||
{
|
||||
if (mText.length() > 0)
|
||||
{
|
||||
mText.erase(mText.length() - 1, mText.length());
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
byte keyState[256]; // BYTE to byte
|
||||
// GetKeyboardState(keyState); evil
|
||||
|
||||
|
||||
// Turn off caps lock since some people use it for voice comm.
|
||||
|
||||
keyState[KEY_CAPSLOCK] = 0;
|
||||
|
||||
// Turn off control since some people use it for crouching.
|
||||
|
||||
keyState[KEY_LCONTROL] = 0;
|
||||
keyState[KEY_RCONTROL] = 0;
|
||||
//@2014 removed keyState[VK_CONTROL] = 0;
|
||||
|
||||
char buffer[3] = { 0 };
|
||||
//@2014 LPWORD is evil
|
||||
// int count = toascii(virtualKey, scanCode, keyState, (LPWORD)buffer, 0);
|
||||
int count = 1;
|
||||
if (count > 0)
|
||||
{
|
||||
mText += buffer;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void ChatPanel::paint()
|
||||
{
|
||||
|
||||
const AvHFont& theFont = gHUD.GetSmallFont();
|
||||
int thePadSize = 5;
|
||||
|
||||
//requestFocus();
|
||||
|
||||
int width;
|
||||
int height;
|
||||
|
||||
getSize(width, height);
|
||||
|
||||
int x = thePadSize;
|
||||
int y = (height - theFont.GetStringHeight()) / 2;
|
||||
|
||||
char prompt[128];
|
||||
strncpy(prompt, mChatMode.c_str(), 127);
|
||||
|
||||
prompt[0] = toupper( prompt[0] );
|
||||
|
||||
// Remove any _'s (say_team becomes say team)
|
||||
for ( char *pApersand = prompt; pApersand != NULL && *pApersand != 0; pApersand++ )
|
||||
{
|
||||
// Replace it with a space
|
||||
if ( *pApersand == '_' )
|
||||
*pApersand = ' ';
|
||||
}
|
||||
|
||||
strcat(prompt, ": ");
|
||||
|
||||
x = theFont.DrawString(x, y, prompt, 128, 128, 128);
|
||||
|
||||
const char* text = mText.c_str();
|
||||
|
||||
while (x + theFont.GetStringWidth(text) > width - thePadSize)
|
||||
{
|
||||
++text;
|
||||
}
|
||||
|
||||
x = theFont.DrawString(x, y, text, 255, 255, 255);
|
||||
|
||||
}
|
||||
|
||||
void ChatPanel::paintBackground()
|
||||
{
|
||||
|
||||
int width;
|
||||
int height;
|
||||
|
||||
getSize(width, height);
|
||||
|
||||
drawSetColor(0,0,0, 80);
|
||||
drawFilledRect(0,0, width, height);
|
||||
|
||||
}
|
||||
|
||||
bool ChatPanel::WasKeyPushed(int virtualKey) const
|
||||
{
|
||||
if (virtualKey >= 0 && virtualKey < 256)
|
||||
{
|
||||
return mKeyPushed[virtualKey];
|
||||
}
|
||||
else
|
||||
{
|
||||
return true;
|
||||
}
|
||||
}
|
|
@ -7,7 +7,8 @@
|
|||
#include "mod/AvHClientVariables.h"
|
||||
#include "VGUI_App.h"
|
||||
#include <stdio.h>
|
||||
// for FindFirst and FindNext //@2014 implement those for linux
|
||||
//@linux support
|
||||
#include "../util/LinuxSupport.h"
|
||||
#ifdef _WIN32
|
||||
#include "winsani_in.h"
|
||||
#include <windows.h>
|
||||
|
@ -199,16 +200,19 @@ void UIHud::LoadSchemes(void)
|
|||
// this->InitializeScheme("Heading1", pScheme);
|
||||
}
|
||||
|
||||
// @linux needs to be reinplementet for linux
|
||||
bool UIHud::PickRandomSong(string& outRelativeSongName) const
|
||||
{
|
||||
bool theFoundSong = false;
|
||||
/* @2014 needs to be reinplementet for linux
|
||||
WIN32_FIND_DATA theFindData;
|
||||
HANDLE theFileHandle;
|
||||
#ifdef WIN32
|
||||
const string kDelimiter("\\");
|
||||
#else
|
||||
const string kDelimiter("/");
|
||||
#endif
|
||||
|
||||
StringList theSongList;
|
||||
bool theFoundSong = false;
|
||||
size_t theNumSongs;
|
||||
|
||||
|
||||
// Find random song in directory
|
||||
string thePath;
|
||||
if(strcmp(cl_musicdir->string, ""))
|
||||
|
@ -217,16 +221,19 @@ bool UIHud::PickRandomSong(string& outRelativeSongName) const
|
|||
}
|
||||
else
|
||||
{
|
||||
thePath = string(getModDirectory()) + string("\\") + string(kMusicDirectory);
|
||||
thePath = string(getModDirectory()) + kDelimiter + string(kMusicDirectory);
|
||||
}
|
||||
|
||||
string theFileQualifier = thePath + string("\\*.mp3");
|
||||
string theFileQualifier = thePath + kDelimiter +string("*.mp3");
|
||||
#ifdef WIN32
|
||||
WIN32_FIND_DATA theFindData;
|
||||
HANDLE theFileHandle;
|
||||
theFileHandle = FindFirstFile(theFileQualifier.c_str(), &theFindData);
|
||||
|
||||
if (theFileHandle != INVALID_HANDLE_VALUE)
|
||||
{
|
||||
do
|
||||
{
|
||||
theSongList.push_back(thePath + string("\\") + string(theFindData.cFileName));
|
||||
theSongList.push_back(thePath + kDelimiter + string(theFindData.cFileName));
|
||||
}
|
||||
while(FindNextFile(theFileHandle, &theFindData));
|
||||
|
||||
|
@ -234,7 +241,20 @@ bool UIHud::PickRandomSong(string& outRelativeSongName) const
|
|||
theFileHandle = INVALID_HANDLE_VALUE;
|
||||
|
||||
}
|
||||
#else
|
||||
string theFoundFilename;
|
||||
FIND_DATA theFindData;
|
||||
int theRC = FindFirstFile(theFileQualifier.c_str(), &theFindData);
|
||||
|
||||
if(theRC != -1)
|
||||
{
|
||||
do
|
||||
{
|
||||
theSongList.push_back(thePath + kDelimiter + string(theFindData.cFileName));
|
||||
}
|
||||
while(FindNextFile(0, &theFindData));
|
||||
}
|
||||
#endif
|
||||
// Pick a random song in the list
|
||||
theNumSongs = theSongList.size();
|
||||
if(theNumSongs > 0)
|
||||
|
@ -243,7 +263,7 @@ bool UIHud::PickRandomSong(string& outRelativeSongName) const
|
|||
outRelativeSongName = string(theSongList[theSongOffset]);
|
||||
theFoundSong = true;
|
||||
}
|
||||
*/
|
||||
|
||||
return theFoundSong;
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
#define kCatalystDuration 8
|
||||
#define kCatalystResearchCost 20
|
||||
#define kCatalystResearchTime 40
|
||||
#define kChargeDamage 320
|
||||
#define kChargeDamage 80
|
||||
#define kClawsDamage 90
|
||||
#define kCombatBaseExperience 100
|
||||
#define kCombatBaseRespawnTime 5
|
||||
|
@ -84,7 +84,7 @@
|
|||
#define kDefenseChamberThinkInterval 2
|
||||
#define kDefensiveChamberHealRange 400
|
||||
#define kDefensiveChamberRegenAmount 10
|
||||
#define kDefensiveChamberRegenPercent 1
|
||||
#define kDefensiveChamberRegenPercent 3
|
||||
#define kDevourDamage 3
|
||||
#define kDevourRange 100
|
||||
#define kDistressBeaconCost 15
|
||||
|
@ -121,7 +121,7 @@
|
|||
#define kGameHDSpaceNeeded 300
|
||||
#define kGameVersionMajor 3
|
||||
#define kGameVersionMinor 2
|
||||
#define kGameVersionRevision 0
|
||||
#define kGameVersionRevision 1
|
||||
#define kGestateBaseArmor 150
|
||||
#define kGestateHealth 200
|
||||
#define kGorgeArmorUpgrade 50
|
||||
|
@ -224,7 +224,7 @@
|
|||
#define kOnosBaseSpeed 240
|
||||
#define kOnosCost 75
|
||||
#define kOnosGestateTime 35
|
||||
#define kOnosHealth 700
|
||||
#define kOnosHealth 950
|
||||
#define kOrganicStructureHealRate 5
|
||||
#define kParasiteDamage 10
|
||||
#define kPhaseGateBuildTime 12
|
||||
|
@ -245,7 +245,7 @@
|
|||
#define kResourceTowerBuildDistanceTolerance 250
|
||||
#define kResourceTowerBuildTime 15
|
||||
#define kResourceTowerCost 15
|
||||
#define kResourceTowerHealth 6000
|
||||
#define kResourceTowerHealth 5500
|
||||
#define kSGBulletsPerShot 10
|
||||
#define kSGDamage 17
|
||||
#define kSGMaxAmmo 40
|
||||
|
@ -265,7 +265,7 @@
|
|||
#define kScoringKillPlayerLerk 3
|
||||
#define kScoringKillPlayerOnos 5
|
||||
#define kScoringMarineBuildableValue 2
|
||||
#define kScoringResourceTowerValue 3
|
||||
#define kScoringResourceTowerValue 5
|
||||
#define kScoringSiegeValue 3
|
||||
#define kScoringTurretValue 2
|
||||
#define kSensoryChamberBuildTime 14
|
||||
|
@ -353,7 +353,7 @@
|
|||
#define kCatalystROFFactor 0.25
|
||||
#define kCatalystSpeedIncrease 0.25
|
||||
#define kChargeEnergyCost 0.15
|
||||
#define kChargeMaxPushbackSpeedFactor 2.50
|
||||
#define kChargeMaxPushbackSpeedFactor 2.75
|
||||
#define kChargeMaxPushbackForce 100.0
|
||||
#define kChargePushbackRadius 100.0
|
||||
#define kChargeSpeed 1.00
|
||||
|
@ -361,7 +361,7 @@
|
|||
#define kChargingEnergyScalar 2.80
|
||||
#define kClawsEnergyCost 0.07
|
||||
#define kClawsROF 0.90
|
||||
#define kCloakTime 6.00
|
||||
#define kCloakTime 12.0
|
||||
#define kCombatAdditiveRespawnTime 2.00
|
||||
#define kCombatDistressBeaconDeadPercentage 0.70
|
||||
#define kCombatExperienceAlienGrowthRate 0.00
|
||||
|
@ -423,7 +423,7 @@
|
|||
#define kParasiteEnergyCost 0.30
|
||||
#define kParasiteROF 0.50
|
||||
#define kPhaseGateDelay 2.00
|
||||
#define kPhaseGateDepartureInterval 0.50
|
||||
#define kPhaseGateDepartureInterval 0.40
|
||||
#define kPrimalScreamDamageModifier 0.30
|
||||
#define kPrimalScreamDuration 4.00
|
||||
#define kPrimalScreamEnergyCost 0.45
|
||||
|
@ -431,7 +431,7 @@
|
|||
#define kPrimalScreamROF 5.00
|
||||
#define kPrimalScreamROFFactor 0.30
|
||||
#define kRecycleResourcePercentage 0.50
|
||||
#define kRecloakTime 3.0f
|
||||
#define kRecloakTime 1.0
|
||||
#define kRedemptionChance 0.45
|
||||
#define kRedemptionThreshold 0.40
|
||||
#define kReinforcementMinimumWaitLevelScalar 0.20
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
#ifdef _WIN32
|
||||
#include "GammaTable.h"
|
||||
|
||||
// Include windows gamma functions
|
||||
|
@ -12,7 +11,7 @@
|
|||
GammaTable::GammaTable()
|
||||
{
|
||||
this->mSlope = 1.0f;
|
||||
this->InitializeToFlat();
|
||||
//this->InitializeToFlat(); // will cause @linux client to crash at start
|
||||
this->mDirect3DMode = false;
|
||||
}
|
||||
|
||||
|
@ -121,4 +120,3 @@ void GammaTable::ProcessSlope(float inSlope)
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#ifdef _WIN32
|
||||
|
||||
|
||||
#ifndef GAMMATABLE_H
|
||||
#define GAMMATABLE_H
|
||||
|
@ -44,4 +44,4 @@ private:
|
|||
};
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
#include "common/vec_op.h"
|
||||
#include "common/mathlib.h"
|
||||
|
||||
|
||||
#define max(a,b) (((a) > (b)) ? (a) : (b))
|
||||
#define min(a,b) (((a) < (b)) ? (a) : (b))
|
||||
|
||||
|
@ -140,49 +139,6 @@ bool IsVectorBetweenBoundingVectors(const float* inOrigin, const float* inRay, c
|
|||
return theSuccess;
|
||||
}
|
||||
|
||||
void AngleMatrix(const float* angles, float matrix[3][4])
|
||||
{
|
||||
float angle;
|
||||
float sr, sp, sy, cr, cp, cy;
|
||||
|
||||
angle = angles[2] * (M_PI*2 / 360);
|
||||
sy = sin(angle);
|
||||
cy = cos(angle);
|
||||
angle = angles[1] * (M_PI*2 / 360);
|
||||
sp = sin(angle);
|
||||
cp = cos(angle);
|
||||
angle = angles[0] * (M_PI*2 / 360);
|
||||
sr = sin(angle);
|
||||
cr = cos(angle);
|
||||
|
||||
// matrix = (Z * Y) * X
|
||||
matrix[0][0] = cp*cy;
|
||||
matrix[1][0] = cp*sy;
|
||||
matrix[2][0] = -sp;
|
||||
matrix[0][1] = sr*sp*cy+cr*-sy;
|
||||
matrix[1][1] = sr*sp*sy+cr*cy;
|
||||
matrix[2][1] = sr*cp;
|
||||
matrix[0][2] = (cr*sp*cy+-sr*-sy);
|
||||
matrix[1][2] = (cr*sp*sy+-sr*cy);
|
||||
matrix[2][2] = cr*cp;
|
||||
matrix[0][3] = 0.0;
|
||||
matrix[1][3] = 0.0;
|
||||
matrix[2][3] = 0.0;
|
||||
}
|
||||
|
||||
float Length(const float *v)
|
||||
{
|
||||
int i;
|
||||
float length;
|
||||
|
||||
length = 0;
|
||||
for (i=0 ; i< 3 ; i++)
|
||||
length += v[i]*v[i];
|
||||
length = sqrt (length); // FIXME
|
||||
|
||||
return length;
|
||||
}
|
||||
|
||||
void RotateFloatValuesByVector(float& ioX, float& ioY, float& ioZ, /*const float* inBaseVector,*/ const float* inVector)
|
||||
{
|
||||
// Get rotation vector
|
||||
|
@ -285,7 +241,7 @@ void RotateValuesByVector(int32& ioX, int32& ioY, int32& ioZ, /*const float* inB
|
|||
ioY = (int32)ioFloatY;
|
||||
ioZ = (int32)ioFloatZ;
|
||||
}
|
||||
|
||||
//#ifndef AVH_SERVER
|
||||
void VectorAngles( const float *forward, float *angles )
|
||||
{
|
||||
float tmp, yaw, pitch;
|
||||
|
@ -329,6 +285,19 @@ void VectorMA (const float *veca, float scale, const float *vecb, float *vecc)
|
|||
vecc[2] = veca[2] + scale*vecb[2];
|
||||
}
|
||||
|
||||
float Length(const float *v)
|
||||
{
|
||||
int i;
|
||||
float length;
|
||||
|
||||
length = 0;
|
||||
for (i=0 ; i< 3 ; i++)
|
||||
length += v[i]*v[i];
|
||||
length = sqrt (length); // FIXME
|
||||
|
||||
return length;
|
||||
}
|
||||
|
||||
float VectorNormalize (float *v)
|
||||
{
|
||||
float length, ilength;
|
||||
|
@ -348,19 +317,20 @@ float VectorNormalize (float *v)
|
|||
|
||||
}
|
||||
|
||||
void VectorRotate (const float* in1, const float in2[3][4], float* out)
|
||||
{
|
||||
out[0] = DotProduct(in1, in2[0]);
|
||||
out[1] = DotProduct(in1, in2[1]);
|
||||
out[2] = DotProduct(in1, in2[2]);
|
||||
}
|
||||
|
||||
void VectorScale (const float *in, float scale, float *out)
|
||||
{
|
||||
out[0] = in[0]*scale;
|
||||
out[1] = in[1]*scale;
|
||||
out[2] = in[2]*scale;
|
||||
}
|
||||
//#endif
|
||||
|
||||
void VectorRotate (const float* in1, const float in2[3][4], float* out)
|
||||
{
|
||||
out[0] = DotProduct(in1, in2[0]);
|
||||
out[1] = DotProduct(in1, in2[1]);
|
||||
out[2] = DotProduct(in1, in2[2]);
|
||||
}
|
||||
|
||||
double VectorDistance(const float* in1, const float* in2)
|
||||
{
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
// - Added VectorDistance2D, added document headers
|
||||
//
|
||||
//===============================================================================
|
||||
#ifdef MATH_UTIL
|
||||
#define MATH_UTIL
|
||||
#include <cmath>
|
||||
#include "stdio.h"
|
||||
#include "stdlib.h"
|
||||
|
@ -285,7 +287,7 @@ void RotateValuesByVector(int32& ioX, int32& ioY, int32& ioZ, /*const float* inB
|
|||
ioY = (int32)ioFloatY;
|
||||
ioZ = (int32)ioFloatZ;
|
||||
}
|
||||
/*
|
||||
|
||||
void VectorAngles( const float *forward, float *angles )
|
||||
{
|
||||
float tmp, yaw, pitch;
|
||||
|
@ -313,7 +315,7 @@ void VectorAngles( const float *forward, float *angles )
|
|||
angles[0] = pitch;
|
||||
angles[1] = yaw;
|
||||
angles[2] = 0;
|
||||
}*/
|
||||
}
|
||||
|
||||
void VectorInverse ( float *v )
|
||||
{
|
||||
|
@ -380,7 +382,6 @@ double VectorDistance2D(const float* in1, const float* in2)
|
|||
}
|
||||
|
||||
// Added by mmcguire.
|
||||
|
||||
void VectorsToAngles(const float forward[3], const float right[3], const float up[3], float angles[3])
|
||||
{
|
||||
|
||||
|
@ -412,3 +413,4 @@ void VectorsToAngles(const float forward[3], const float right[3], const float u
|
|||
angles[0] = p * (180 / M_PI); // Pitch
|
||||
angles[1] = y * (180 / M_PI); // Yaw
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
#define M_PI 3.14159265358979323846 // matches value in gcc v2 math.h
|
||||
#endif
|
||||
|
||||
void AngleMatrix(const float* angles, float matrix[3][4]);
|
||||
//void AngleMatrix(const float* angles, float matrix[3][4]);
|
||||
double sqrt(double x);
|
||||
float Length(const float *v);
|
||||
void CreateOrthoNormalBasis(float inZAxis[3], float outXAxis[3], float outYAxis[3]);
|
||||
|
|
|
@ -1 +1 @@
|
|||
70
|
||||
70
|
||||
|
|
Loading…
Reference in a new issue