diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2de2386d7d..a6b9aadfe9 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -1,192 +1 @@ -# Contributors Guide - -So you've decided to become a contributor to our project. Excellent! - -We are always looking for new developers, so if you're new, -please check out our [Getting Started guide](https://wiki.multitheftauto.com/wiki/Coding_info). - -But before we can start accepting your code, there are a couple of -things you should know about how we work. - -This document mostly contains guidelines and rules as to how your -code should be structured and how it can be committed without -upsetting any fellow contributors. - -## Where to code - -As a new potential contributor, you will need to fork our repository and make -commits to your own "branch". Then you can send us a pull request. - -Our _`master`_ branch is the main development branch containing the -latest, bleeding-edge code. - -Our _other_ branches contain groundbreaking research, radical ideas and other -work-in-progress changes that are meant to be merged into `master` at -a later point in time. - -If you're a collaborator, it's your choice whether to push branches to this -repository or to your own fork. - -**Branches are "topical" and should not be "personal" to each -user.** This means that a branch should be created for a new feature, -not for a user specific playground. - -## What to code - -Generally, please try submit pull requests that resolve existing -[issues](https://github.com/multitheftauto/mtasa-blue/issues). - -If you're looking for something to work on, take a look at the ["good first issue"] -label, or our [milestones]. - -["good first issue"]: https://github.com/multitheftauto/mtasa-blue/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3A%22good+first+issue%22 -[milestones]: https://github.com/multitheftauto/mtasa-blue/milestones?direction=asc&sort=due_date - -Of course, if you're interested in something else, feel free to experiment -and submit it. But discussing the feature beforehand, in an issue, will -make your pull request more likely to be merged in a timely fashion. - -## Committing code - -**Make sure your code contributions follow the [Style Guide]**. - -[Style Guide]: https://github.com/multitheftauto/mtasa-blue/wiki/Style-Guide - -**Commits should be tested when added to master.** Commits -that 'need to be fixed later' which directly affect the state of -the mod will be reverted other than in exceptional circumstances. - -**Commit messages should** - -- be consistent -- always give a clear indication of what has been changed without having to look at the code -- include issue numbers, using [GitHub keywords](https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword) where necessary -- [follow the seven rules identified here](http://chris.beams.io/posts/git-commit/) - -The most important of the [seven rules](http://chris.beams.io/posts/git-commit/) has been copied below, but please read the article: - -1. Separate subject from body with a blank line -2. Limit the subject line to around 60-80 characters (the [seven rules] say 50, but we think ~70 is okay) -3. Use the imperative mood in the subject line -4. Use the body to explain what and why vs. how - -**Follow up (addendum) commits should refer to the previous commit.** Do this by -including the previous commit-identifier SHA and, if there's space, a summarised commit message in -the new commit message. Doing this will help identify related commits -if they are viewed at a later date. - -**Try to keep pull requests small — they should be about one thing.** When you do multiple things -in one pull request, it's hard to review. If you're fixing stuff as you go, you might want -to make atomic commits and then cherry-pick those commits into separate branches, -leaving the pull request clean. - -**Read the ["Code Review"] guide** for more guidelines about the code review process. - -**Examples**. Here are some examples of commit messages with a short and descriptive title in the imperative mood. - -1. Here we also have a description that explains the content of the commit. - ``` - Fix vehicle model memory leaks in engineReplaceModel - - Fixed 3 memory leaks: - - clump model leak - - vehicle visual data (dummies) leak - - engineReplaceModel added extra references to TXD, and this was not getting unloaded at times - ``` - -2. Here we have a longer description that explains how to use the feature. The body is wrapped at 72 characters. - ``` - Add "beta" CVAR "_beta_qc_rightclick_command" - - This variable lets you execute a command of your choice when you right - click the "quick connect" button. - - By default this CVAR is set to "reconnect", but you can set it to - anything - "connect orange.mtasa.com" or "nick timw0w". - - In the console, type "_beta_qc_rightclick_command" and press enter. This - will tell you the current value of the CVAR. - - You can do "_beta_qc_rightclick_command=nick timw0w" to change the - value of the CVAR. - ``` - -3. Here we say `Fix #1115` so that GitHub automatically closes issue #1115. There's no description. - ``` - Fix #1115: add async encode/decodeString - ``` - -4. There was no specific issue being fixed here, but GitHub's squash-merge feature automatically appended `(#1177)`, - telling us which pull request created this commit. There's no description. - ``` - Add "remember this option" checkbox to NVidia Optimus dialog (#1177) - ``` - -5. Here we refer to a previous commit. - ``` - Addendum to a80f8d6: fix Windows build error - ``` - -## Reviewing code - -Contributors should try to review other contributor's commits and provide -feedback as much as possible. - -Please read our ["Code Review"] article for information on how to review code effectively. - -["Code Review"]: https://github.com/multitheftauto/mtasa-blue/wiki/Code-Review - - - -## Gaining and losing merge rights - -Merge rights allow you to merge your own approved pull requests and -review other people's pull requests. - -We grant merge rights after you have proven yourself to be competent, -which is generally after 3-5 pull requests. This is not fixed and depends -on the extent of your contributions, community status and other factors. - -The subject matter of your pull requests do not matter — we are more interested in, -once granted merge rights, whether you are capable of maintaining -a high standard of code and remaining cohesive with other project collaborators. - -After gaining merge rights, if your contributions are of a consistently low standard, -or you fail to stick to the rules, your permissions will be revoked. - -## Merging pull requests - -Before merging, enforced by GitHub's branch protection, pull requests **require**: -- Linux and Windows status checks to pass -- 1 pull request review - -If the pull request is large, try and only merge if there at least 2 pull request reviews. -This isn't enforced via branch protection, but please try and stick to this convention -(... unless nobody else is reviewing your PR). - -Branch protection is **not enforced** for repository administrators, -and those people are therefore not required to send pull requests. Individual repository admins may, -for the greater good, pledge to submit pull requests despite this lack of enforcement. - -For informational purposes, the current repository administrators are those marked as _The MTA Team_ on -[this list](https://forum.mtasa.com/staff/). - -**Merge button** - -Generally use the "Squash and merge" button. If multiple commits are needed because you think -having the separate commits are useful, use "Rebase and merge". +This information is now available at [mtasa-docs (mtasa-blue CONTRIBUTING.md)](https://github.com/multitheftauto/mtasa-docs/blob/main/mtasa-blue/CONTRIBUTING.md). diff --git a/Client/cefweb/CWebApp.cpp b/Client/cefweb/CWebApp.cpp index 886d0e109c..a6fe5397e5 100644 --- a/Client/cefweb/CWebApp.cpp +++ b/Client/cefweb/CWebApp.cpp @@ -21,8 +21,6 @@ CefRefPtr CWebApp::HandleError(const SString& strError, unsi void CWebApp::OnBeforeCommandLineProcessing(const CefString& process_type, CefRefPtr command_line) { - command_line->AppendSwitch("disable-gpu-compositing"); - command_line->AppendSwitch("disable-gpu"); // command_line->AppendSwitch("disable-d3d11"); command_line->AppendSwitch("enable-begin-frame-scheduling"); diff --git a/Client/cefweb/CWebCore.cpp b/Client/cefweb/CWebCore.cpp index de21171949..fe02e029a3 100644 --- a/Client/cefweb/CWebCore.cpp +++ b/Client/cefweb/CWebCore.cpp @@ -71,7 +71,6 @@ bool CWebCore::Initialise() #else CefString(&settings.browser_subprocess_path).FromWString(FromUTF8(CalcMTASAPath("MTA\\CEF\\CEFLauncher_d.exe"))); #endif - CefString(&settings.resources_dir_path).FromWString(FromUTF8(CalcMTASAPath("MTA\\CEF"))); CefString(&settings.cache_path).FromWString(FromUTF8(CalcMTASAPath("MTA\\CEF\\cache"))); CefString(&settings.locales_dir_path).FromWString(FromUTF8(CalcMTASAPath("MTA\\CEF\\locales"))); CefString(&settings.log_file).FromWString(FromUTF8(CalcMTASAPath("MTA\\CEF\\cefdebug.txt"))); diff --git a/Client/core/CCore.cpp b/Client/core/CCore.cpp index 364836e111..b9a2391f46 100644 --- a/Client/core/CCore.cpp +++ b/Client/core/CCore.cpp @@ -1869,6 +1869,13 @@ void CCore::RecalculateFrameRateLimit(uint uiServerFrameRateLimit, bool bLogToCo if ((m_uiFrameRateLimit == 0 || uiClientScriptRate < m_uiFrameRateLimit) && uiClientScriptRate > 0) m_uiFrameRateLimit = uiClientScriptRate; + // Removes Limiter from Frame Graph if limit is zero and skips frame limit + if (m_uiFrameRateLimit == 0) + { + m_bQueuedFrameRateValid = false; + GetGraphStats()->RemoveTimingPoint("Limiter"); + } + // Print new limits to the console if (bLogToConsole) { diff --git a/Client/core/CGraphStats.cpp b/Client/core/CGraphStats.cpp index 3a5a25cc2e..bf53a0f91e 100644 --- a/Client/core/CGraphStats.cpp +++ b/Client/core/CGraphStats.cpp @@ -39,6 +39,7 @@ class CGraphStats : public CGraphStatsInterface virtual void SetEnabled(bool bEnabled); virtual bool IsEnabled(); virtual void AddTimingPoint(const char* szName); + virtual void RemoveTimingPoint(const char* szName); protected: bool m_bEnabled; @@ -189,6 +190,21 @@ void CGraphStats::AddTimingPoint(const char* szName) pLine->dataHistory[pLine->iDataPos] = AvgData; } +/////////////////////////////////////////////////////////////// +// +// CGraphStats::RemoveTimingPoint +// +// +// +/////////////////////////////////////////////////////////////// +void CGraphStats::RemoveTimingPoint(const char* szName) +{ + if (!IsEnabled() || szName[0] == 0) + return; + + MapRemove(m_LineList, szName); +} + /////////////////////////////////////////////////////////////// // // CGraphStats::Draw diff --git a/Client/core/CGraphStats.h b/Client/core/CGraphStats.h index 657bc3338c..bc152e9b15 100644 --- a/Client/core/CGraphStats.h +++ b/Client/core/CGraphStats.h @@ -23,6 +23,7 @@ class CGraphStatsInterface virtual void SetEnabled(bool bEnabled) = 0; virtual bool IsEnabled() = 0; virtual void AddTimingPoint(const char* szName) = 0; + virtual void RemoveTimingPoint(const char* szName) = 0; }; CGraphStatsInterface* GetGraphStats(); diff --git a/Client/core/CNickGen.cpp b/Client/core/CNickGen.cpp index 13f38c470b..a4cb2738e2 100644 --- a/Client/core/CNickGen.cpp +++ b/Client/core/CNickGen.cpp @@ -22,180 +22,178 @@ const char* const CNickGen::m_szAdjectives[] = { "Awake", "Aware", "Awesome", "Awful", "Axiomatic", "Bad", "Barbarous", "Bashful", "Bawdy", "Beautiful", "Befitting", "Beneficial", "Bent", "Berserk", "Best", "Better", "Bewildered", "Big", "Billowy", "Bite-sized", "Bitter", "Bizarre", "Black", "Bloody", "Blue", "Blue-eyed", "Blushing", "Boiling", "Boorish", "Bored", "Boring", "Bouncy", "Boundless", - "Brainy", "Brash", "Brave", "Brawny", "Breakable", "Breezy", "Brief", "Bright", "Bright", "Broad", "Broken", - "Brown", "Bumpy", "Burly", "Bustling", "Busy", "Cagey", "Callous", "Calm", "Capable", "Capricious", "Careful", - "Careless", "Caring", "Cautious", "Ceaseless", "Certain", "Changeable", "Charming", "Cheap", "Cheerful", "Chemical", "Chief", - "Childlike", "Chilly", "Chivalrous", "Chubby", "Chunky", "Clammy", "Classy", "Clean", "Clear", "Clever", "Cloistered", - "Cloudy", "Closed", "Clumsy", "Cluttered", "Coherent", "Cold", "Colorful", "Colossal", "Combative", "Common", "Complete", - "Complex", "Concerned", "Condemned", "Confused", "Conscious", "Cooing", "Cool", "Courageous", "Cowardly", "Crabby", "Craven", - "Crazy", "Creepy", "Crooked", "Crowded", "Cruel", "Cuddly", "Cultured", "Cumbersome", "Curious", "Curly", "Curved", - "Curvy", "Cut", "Cute", "Cynical", "Daffy", "Daily", "Damaged", "Damaging", "Damp", "Dangerous", "Dapper", - "Dark", "Dashing", "Dazzling", "Dead", "Deadpan", "Deafening", "Dear", "Debonair", "Decisive", "Decorous", "Deep", - "Deeply", "Defeated", "Defective", "Defiant", "Delicate", "Delicious", "Delightful", "Demonic", "Delirious", "Dependent", "Depressed", - "Deranged", "Deserted", "Detailed", "Determined", "Devilish", "Didactic", "Different", "Difficult", "Diligent", "Direful", "Dirty", - "Disastrous", "Discreet", "Disgusted", "Disgusting", "Distinct", "Disturbed", "Divergent", "Dizzy", "Doubtful", "Drab", "Draconian", - "Dramatic", "Dreary", "Drunk", "Dry", "Dull", "Dusty", "Dusty", "Dynamic", "Eager", "Early", "Earthy", - "Easy", "Eatable", "Economic", "Educated", "Efficient", "Eight", "Elastic", "Elated", "Elderly", "Electric", "Elegant", - "Elfin", "Elite", "Eminent", "Empty", "Enchanted", "Enchanting", "Endurable", "Energetic", "Enormous", "Envious", "Equable", - "Equal", "Erect", "Erratic", "Ethereal", "Evanescent", "Evasive", "Even", "Excellent", "Excited", "Exciting", "Exclusive", - "Exotic", "Expensive", "Exuberant", "Exultant", "Fabulous", "Faded", "Faint", "Fair", "Faithful", "Fallacious", "False", - "Familiar", "Famous", "Fanatical", "Fancy", "Fantastic", "Far", "Far-flung", "Fascinated", "Fast", "Fat", "Faulty", - "Fearful", "Fearless", "Feeble", "Feigned", "Female", "Fertile", "Festive", "Few", "Fierce", "Filthy", "Fine", - "Finicky", "First", "Five", "Fixed", "Flagrant", "Flaky", "Flashy", "Flat", "Flawless", "Flimsy", "Flippant", - "Flowery", "Fluffy", "Fluttering", "Foamy", "Foolish", "Foregoing", "Forgetful", "Fortunate", "Four", "Frail", "Fragile", - "Frantic", "Free", "Freezing", "Frequent", "Fresh", "Fretful", "Friendly", "Frightened", "Full", "Fumbling", "Functional", - "Funny", "Furry", "Furtive", "Future", "Futuristic", "Fuzzy", "Gabby", "Gainful", "Gamy", "Gaping", "Garrulous", - "Gaudy", "General", "Gentle", "Giant", "Giddy", "Gifted", "Gigantic", "Glamorous", "Gleaming", "Glib", "Glistening", - "Glorious", "Glossy", "Godly", "Good", "Goofy", "Gorgeous", "Graceful", "Grandiose", "Grateful", "Gratis", "Gray", - "Greasy", "Great", "Greedy", "Green", "Grey", "Grieving", "Groovy", "Grotesque", "Grouchy", "Grubby", "Gruesome", - "Grumpy", "Guarded", "Guiltless", "Gullible", "Gusty", "Guttural", "Habitual", "Half", "Hallowed", "Halting", "Handsome", - "Handsomely", "Handy", "Hanging", "Hapless", "Happy", "Hard", "Harmonious", "Harsh", "Hateful", "Heady", "Healthy", - "Heavenly", "Heavy", "Hellish", "Helpful", "Helpless", "Hesitant", "Hideous", "High", "Hilarious", "Hissing", "Historical", - "Holistic", "Hollow", "Homeless", "Homely", "Honorable", "Horrible", "Hospitable", "Hot", "Huge", "Hulking", "Humdrum", - "Humorous", "Hungry", "Hurried", "Hurt", "Hushed", "Husky", "Hypnotic", "Hysterical", "Icky", "Icy", "Idiotic", - "Ignorant", "Ill", "Illegal", "Ill-fated", "Imaginary", "Immense", "Imminent", "Impartial", "Imperfect", "Impolite", "Important", - "Imported", "Impossible", "Incredible", "Infamous", "Innate", "Innocent", "Insidious", "Internal", "Invincible", "Irate", "Irritating", - "Itchy", "Jaded", "Jagged", "Jazzy", "Jealous", "Jittery", "Jobless", "Jolly", "Joyous", "Judicious", "Juicy", - "Jumbled", "Jumpy", "Juvenile", "Kaput", "Keen", "Kind", "Kindly", "Knotty", "Knowing", "Known", "Labored", - "Lacking", "Lame", "Lamentable", "Languid", "Large", "Last", "Late", "Laughable", "Lavish", "Lazy", "Lean", - "Learned", "Left", "Legal", "Lethal", "Level", "Lewd", "Light", "Like", "Likeable", "Limping", "Literate", - "Little", "Lively", "Lively", "Living", "Lonely", "Long", "Longing", "Long-term", "Loose", "Lopsided", "Loud", - "Loutish", "Lovely", "Loving", "Low", "Lowly", "Lucky", "Ludicrous", "Lumpy", "Lush", "Luxuriant", "Lying", - "Lyrical", "Macabre", "Macho", "Maddening", "Madly", "Magenta", "Magical", "Majestic", "Makeshift", "Male", "Malicious", - "Mammoth", "Maniacal", "Many", "Marked", "Massive", "Married", "Marvelous", "Material", "Mature", "Mean", "Measly", - "Meaty", "Medical", "Meek", "Mellow", "Melodic", "Melted", "Merciful", "Mere", "Messy", "Mighty", "Military", - "Milky", "Mindless", "Miniature", "Minor", "Miscreant", "Misty", "Mixed", "Moaning", "Modern", "Moldy", "Momentous", - "Motionless", "Muddled", "Mundane", "Murky", "Mushy", "Mute", "Mysterious", "Naive", "Nappy", "Narrow", "Nasty", - "Natural", "Naughty", "Nauseating", "Near", "Neat", "Nebulous", "Necessary", "Needless", "Needy", "Neighborly", "Nervous", - "New", "Next", "Nice", "Nifty", "Nimble", "Nine", "Nippy", "Noiseless", "Noisy", "Nonchalant", "Nonstop", - "Normal", "Nostalgic", "Nosy", "Noxious", "Null", "Numberless", "Numerous", "Nutritious", "Nutty", "Oafish", "Obedient", - "Obeisant", "Obese", "Obnoxious", "Obscene", "Obsequious", "Observant", "Obsolete", "Obtainable", "Oceanic", "Odd", "Offbeat", - "Old", "Omniscient", "One", "Onerous", "Open", "Opposite", "Optimal", "Orange", "Ordinary", "Organic", "Ossified", - "Outgoing", "Outrageous", "Oval", "Overjoyed", "Overrated", "Overt", "Painful", "Pale", "Paltry", "Panicky", "Panoramic", - "Parallel", "Parched", "Past", "Pastoral", "Pathetic", "Peaceful", "Penitent", "Perfect", "Periodic", "Perpetual", "Petite", - "Petite", "Phobic", "Physical", "Picayune", "Pink", "Piquant", "Placid", "Plain", "Plant", "Plastic", "Plausible", - "Pleasant", "Plucky", "Pointless", "Poised", "Polite", "Political", "Poor", "Possessive", "Possible", "Powerful", "Precious", - "Premium", "Present", "Pretty", "Previous", "Pricey", "Prickly", "Private", "Probable", "Productive", "Profuse", "Protective", - "Proud", "Psychotic", "Public", "Puffy", "Pumped", "Puny", "Purple", "Purring", "Pushy", "Puzzled", "Puzzling", - "Quack", "Quaint", "Quick", "Quickest", "Quiet", "Quirky", "Quixotic", "Quizzical", "Rabid", "Racial", "Ragged", - "Rainy", "Rampant", "Rapid", "Rare", "Raspy", "Ratty", "Ready", "Real", "Rebel", "Receptive", "Recondite", - "Red", "Redundant", "Reflective", "Regular", "Relieved", "Remarkable", "Repulsive", "Resolute", "Resonant", "Rhetorical", "Rich", - "Right", "Righteous", "Rightful", "Rigid", "Ripe", "Ritzy", "Roasted", "Robust", "Romantic", "Roomy", "Rotten", - "Rough", "Round", "Royal", "Ruddy", "Rude", "Rural", "Rustic", "Ruthless", "Sable", "Sad", "Safe", - "Salty", "Same", "Sassy", "Satisfying", "Savory", "Scandalous", "Scarce", "Scared", "Scary", "Scattered", "Scientific", - "Scrawny", "Screeching", "Second", "Secret", "Secretive", "Sedate", "Seemly", "Selective", "Selfish", "Separate", "Serious", - "Shaggy", "Shaky", "Shallow", "Sharp", "Shiny", "Shivering", "Shocking", "Short", "Shrill", "Shut", "Shy", - "Sick", "Silent", "Silent", "Silky", "Silly", "Simple", "Simplistic", "Sincere", "Six", "Skillful", "Skinny", - "Sleepy", "Slim", "Slimy", "Slippery", "Sloppy", "Slow", "Small", "Smart", "Smelly", "Smiling", "Smoggy", - "Smooth", "Sneaky", "Snobbish", "Snotty", "Soft", "Soggy", "Solid", "Somber", "Sordid", "Sore", "Sore", - "Sour", "Sparkling", "Special", "Spicy", "Spiffy", "Spiky", "Spiritual", "Spiteful", "Splendid", "Spooky", "Spotless", - "Spotted", "Spotty", "Spurious", "Squalid", "Square", "Squealing", "Squeamish", "Staking", "Stale", "Standing", "Statuesque", - "Steadfast", "Steady", "Stealthy", "Steep", "Sticky", "Stiff", "Stingy", "Stormy", "Straight", "Strange", "Striped", - "Strong", "Stupendous", "Stupid", "Sturdy", "Subdued", "Subsequent", "Successful", "Succinct", "Sudden", "Sulky", "Super", - "Superb", "Supreme", "Swanky", "Sweet", "Sweltering", "Swift", "Synonymous", "Taboo", "Tacit", "Tacky", "Talented", - "Tall", "Tame", "Tan", "Tangible", "Tangy", "Tart", "Tasteful", "Tasteless", "Tasty", "Tawdry", "Tearful", - "Tedious", "Teeny", "Teeny-tiny", "Telling", "Temporary", "Ten", "Tender", "Tense", "Tense", "Tenuous", "Terrible", - "Terrific", "Tested", "Testy", "Thankful", "Thick", "Thin", "Thinkable", "Third", "Thirsty", "Thirsty", "Thoughtful", - "Three", "Thundering", "Tidy", "Tight", "Tiny", "Tired", "Tiresome", "Toothsome", "Torpid", "Tough", "Towering", - "Tranquil", "Trashy", "Tremendous", "Tricky", "Trite", "Troubled", "Truculent", "True", "Truthful", "Two", "Typical", - "Ubiquitous", "Ugliest", "Ugly", "Ultra", "Unable", "Unadvised", "Unarmed", "Unbecoming", "Unbiased", "Uncovered", "Understood", - "Unequal", "Unequaled", "Uneven", "Unhealthy", "Unique", "Unkempt", "Unknown", "Unnatural", "Unruly", "Unsightly", "Unsuitable", - "Untidy", "Unused", "Unusual", "Unwieldy", "Unwritten", "Upbeat", "Uppity", "Upset", "Uptight", "Used", "Useful", - "Useless", "Utopian", "Utter", "Uttermost", "Vacuous", "Vagabond", "Vague", "Valuable", "Various", "Vast", "Vengeful", - "Venomous", "Verdant", "Versed", "Victorious", "Vigorous", "Violent", "Violet", "Vivacious", "Voiceless", "Volatile", "Voracious", - "Vulgar", "Wacky", "Waggish", "Waiting", "Wakeful", "Wandering", "Wanting", "Warlike", "Warm", "Wary", "Wasteful", - "Watery", "Weak", "Wealthy", "Weary", "Well-made", "Well-off", "Well-to-do", "Wet", "Whimsical", "Whispering", "White", - "Whole", "Wholesale", "Wicked", "Wide", "Wide-eyed", "Wiggly", "Wild", "Willing", "Windy", "Wiry", "Wise", - "Wistful", "Witty", "Woebegone", "Womanly", "Wonderful", "Wooden", "Woozy", "Workable", "Worried", "Worthless", "Wrathful", - "Wretched", "Wrong", "Wry", + "Brainy", "Brash", "Brave", "Brawny", "Breakable", "Breezy", "Brief", "Bright", "Broad", "Broken", "Brown", + "Bumpy", "Burly", "Bustling", "Busy", "Cagey", "Callous", "Calm", "Capable", "Capricious", "Careful", "Careless", + "Caring", "Cautious", "Ceaseless", "Certain", "Changeable", "Charming", "Cheap", "Cheerful", "Chemical", "Chief", "Childlike", + "Chilly", "Chivalrous", "Chubby", "Chunky", "Clammy", "Classy", "Clean", "Clear", "Clever", "Cloistered", "Cloudy", + "Closed", "Clumsy", "Cluttered", "Coherent", "Cold", "Colorful", "Colossal", "Combative", "Common", "Complete", "Complex", + "Concerned", "Condemned", "Confused", "Conscious", "Cooing", "Cool", "Courageous", "Cowardly", "Crabby", "Craven", "Crazy", + "Creepy", "Crooked", "Crowded", "Cruel", "Cuddly", "Cultured", "Cumbersome", "Curious", "Curly", "Curved", "Curvy", + "Cut", "Cute", "Cynical", "Daffy", "Daily", "Damaged", "Damaging", "Damp", "Dangerous", "Dapper", "Dark", + "Dashing", "Dazzling", "Dead", "Deadpan", "Deafening", "Dear", "Debonair", "Decisive", "Decorous", "Deep", "Deeply", + "Defeated", "Defective", "Defiant", "Delicate", "Delicious", "Delightful", "Demonic", "Delirious", "Dependent", "Depressed", "Deranged", + "Deserted", "Detailed", "Determined", "Devilish", "Didactic", "Different", "Difficult", "Diligent", "Direful", "Dirty", "Disastrous", + "Discreet", "Disgusted", "Disgusting", "Distinct", "Disturbed", "Divergent", "Dizzy", "Doubtful", "Drab", "Draconian", "Dramatic", + "Dreary", "Drunk", "Dry", "Dull", "Dusty", "Dynamic", "Eager", "Early", "Earthy", "Easy", "Eatable", + "Economic", "Educated", "Efficient", "Eight", "Elastic", "Elated", "Elderly", "Electric", "Elegant", "Elfin", "Elite", + "Eminent", "Empty", "Enchanted", "Enchanting", "Endurable", "Energetic", "Enormous", "Envious", "Equable", "Equal", "Erect", + "Erratic", "Ethereal", "Evanescent", "Evasive", "Even", "Excellent", "Excited", "Exciting", "Exclusive", "Exotic", "Expensive", + "Exuberant", "Exultant", "Fabulous", "Faded", "Faint", "Fair", "Faithful", "Fallacious", "False", "Familiar", "Famous", + "Fanatical", "Fancy", "Fantastic", "Far", "Far-flung", "Fascinated", "Fast", "Fat", "Faulty", "Fearful", "Fearless", + "Feeble", "Feigned", "Female", "Fertile", "Festive", "Few", "Fierce", "Filthy", "Fine", "Finicky", "First", + "Five", "Fixed", "Flagrant", "Flaky", "Flashy", "Flat", "Flawless", "Flimsy", "Flippant", "Flowery", "Fluffy", + "Fluttering", "Foamy", "Foolish", "Foregoing", "Forgetful", "Fortunate", "Four", "Frail", "Fragile", "Frantic", "Free", + "Freezing", "Frequent", "Fresh", "Fretful", "Friendly", "Frightened", "Full", "Fumbling", "Functional", "Funny", "Furry", + "Furtive", "Future", "Futuristic", "Fuzzy", "Gabby", "Gainful", "Gamy", "Gaping", "Garrulous", "Gaudy", "General", + "Gentle", "Giant", "Giddy", "Gifted", "Gigantic", "Glamorous", "Gleaming", "Glib", "Glistening", "Glorious", "Glossy", + "Godly", "Good", "Goofy", "Gorgeous", "Graceful", "Grandiose", "Grateful", "Gratis", "Gray", "Greasy", "Great", + "Greedy", "Green", "Grey", "Grieving", "Groovy", "Grotesque", "Grouchy", "Grubby", "Gruesome", "Grumpy", "Guarded", + "Guiltless", "Gullible", "Gusty", "Guttural", "Habitual", "Half", "Hallowed", "Halting", "Handsome", "Handsomely", "Handy", + "Hanging", "Hapless", "Happy", "Hard", "Harmonious", "Harsh", "Hateful", "Heady", "Healthy", "Heavenly", "Heavy", + "Hellish", "Helpful", "Helpless", "Hesitant", "Hideous", "High", "Hilarious", "Hissing", "Historical", "Holistic", "Hollow", + "Homeless", "Homely", "Honorable", "Horrible", "Hospitable", "Hot", "Huge", "Hulking", "Humdrum", "Humorous", "Hungry", + "Hurried", "Hurt", "Hushed", "Husky", "Hypnotic", "Hysterical", "Icky", "Icy", "Idiotic", "Ignorant", "Ill", + "Illegal", "Ill-fated", "Imaginary", "Immense", "Imminent", "Impartial", "Imperfect", "Impolite", "Important", "Imported", "Impossible", + "Incredible", "Infamous", "Innate", "Innocent", "Insidious", "Internal", "Invincible", "Irate", "Irritating", "Itchy", "Jaded", + "Jagged", "Jazzy", "Jealous", "Jittery", "Jobless", "Jolly", "Joyous", "Judicious", "Juicy", "Jumbled", "Jumpy", + "Juvenile", "Kaput", "Keen", "Kind", "Kindly", "Knotty", "Knowing", "Known", "Labored", "Lacking", "Lame", + "Lamentable", "Languid", "Large", "Last", "Late", "Laughable", "Lavish", "Lazy", "Lean", "Learned", "Left", + "Legal", "Lethal", "Level", "Lewd", "Light", "Like", "Likeable", "Limping", "Literate", "Little", "Lively", + "Living", "Lonely", "Long", "Longing", "Long-term", "Loose", "Lopsided", "Loud", "Loutish", "Lovely", "Loving", + "Low", "Lowly", "Lucky", "Ludicrous", "Lumpy", "Lush", "Luxuriant", "Lying", "Lyrical", "Macabre", "Macho", + "Maddening", "Madly", "Magenta", "Magical", "Majestic", "Makeshift", "Male", "Malicious", "Mammoth", "Maniacal", "Many", + "Marked", "Massive", "Married", "Marvelous", "Material", "Mature", "Mean", "Measly", "Meaty", "Medical", "Meek", + "Mellow", "Melodic", "Melted", "Merciful", "Mere", "Messy", "Mighty", "Military", "Milky", "Mindless", "Miniature", + "Minor", "Miscreant", "Misty", "Mixed", "Moaning", "Modern", "Moldy", "Momentous", "Motionless", "Muddled", "Mundane", + "Murky", "Mushy", "Mute", "Mysterious", "Naive", "Nappy", "Narrow", "Nasty", "Natural", "Naughty", "Nauseating", + "Near", "Neat", "Nebulous", "Necessary", "Needless", "Needy", "Neighborly", "Nervous", "New", "Next", "Nice", + "Nifty", "Nimble", "Nine", "Nippy", "Noiseless", "Noisy", "Nonchalant", "Nonstop", "Normal", "Nostalgic", "Nosy", + "Noxious", "Null", "Numberless", "Numerous", "Nutritious", "Nutty", "Oafish", "Obedient", "Obeisant", "Obese", "Obnoxious", + "Obscene", "Obsequious", "Observant", "Obsolete", "Obtainable", "Oceanic", "Odd", "Offbeat", "Old", "Omniscient", "One", + "Onerous", "Open", "Opposite", "Optimal", "Orange", "Ordinary", "Organic", "Ossified", "Outgoing", "Outrageous", "Oval", + "Overjoyed", "Overrated", "Overt", "Painful", "Pale", "Paltry", "Panicky", "Panoramic", "Parallel", "Parched", "Past", + "Pastoral", "Pathetic", "Peaceful", "Penitent", "Perfect", "Periodic", "Perpetual", "Petite", "Phobic", "Physical", "Picayune", + "Pink", "Piquant", "Placid", "Plain", "Plant", "Plastic", "Plausible", "Pleasant", "Plucky", "Pointless", "Poised", + "Polite", "Political", "Poor", "Possessive", "Possible", "Powerful", "Precious", "Premium", "Present", "Pretty", "Previous", + "Pricey", "Prickly", "Private", "Probable", "Productive", "Profuse", "Protective", "Proud", "Psychotic", "Public", "Puffy", + "Pumped", "Puny", "Purple", "Purring", "Pushy", "Puzzled", "Puzzling", "Quack", "Quaint", "Quick", "Quickest", + "Quiet", "Quirky", "Quixotic", "Quizzical", "Rabid", "Racial", "Ragged", "Rainy", "Rampant", "Rapid", "Rare", + "Raspy", "Ratty", "Ready", "Real", "Rebel", "Receptive", "Recondite", "Red", "Redundant", "Reflective", "Regular", + "Relieved", "Remarkable", "Repulsive", "Resolute", "Resonant", "Rhetorical", "Rich", "Right", "Righteous", "Rightful", "Rigid", + "Ripe", "Ritzy", "Roasted", "Robust", "Romantic", "Roomy", "Rotten", "Rough", "Round", "Royal", "Ruddy", + "Rude", "Rural", "Rustic", "Ruthless", "Sable", "Sad", "Safe", "Salty", "Same", "Sassy", "Satisfying", + "Savory", "Scandalous", "Scarce", "Scared", "Scary", "Scattered", "Scientific", "Scrawny", "Screeching", "Second", "Secret", + "Secretive", "Sedate", "Seemly", "Selective", "Selfish", "Separate", "Serious", "Shaggy", "Shaky", "Shallow", "Sharp", + "Shiny", "Shivering", "Shocking", "Short", "Shrill", "Shut", "Shy", "Sick", "Silent", "Silky", "Silly", + "Simple", "Simplistic", "Sincere", "Six", "Skillful", "Skinny", "Sleepy", "Slim", "Slimy", "Slippery", "Sloppy", + "Slow", "Small", "Smart", "Smelly", "Smiling", "Smoggy", "Smooth", "Sneaky", "Snobbish", "Snotty", "Soft", + "Soggy", "Solid", "Somber", "Sordid", "Sore", "Sour", "Sparkling", "Special", "Spicy", "Spiffy", "Spiky", + "Spiritual", "Spiteful", "Splendid", "Spooky", "Spotless", "Spotted", "Spotty", "Spurious", "Squalid", "Square", "Squealing", + "Squeamish", "Staking", "Stale", "Standing", "Statuesque", "Steadfast", "Steady", "Stealthy", "Steep", "Sticky", "Stiff", + "Stingy", "Stormy", "Straight", "Strange", "Striped", "Strong", "Stupendous", "Stupid", "Sturdy", "Subdued", "Subsequent", + "Successful", "Succinct", "Sudden", "Sulky", "Super", "Superb", "Supreme", "Swanky", "Sweet", "Sweltering", "Swift", + "Synonymous", "Taboo", "Tacit", "Tacky", "Talented", "Tall", "Tame", "Tan", "Tangible", "Tangy", "Tart", + "Tasteful", "Tasteless", "Tasty", "Tawdry", "Tearful", "Tedious", "Teeny", "Teeny-tiny", "Telling", "Temporary", "Ten", + "Tender", "Tense", "Tenuous", "Terrible", "Terrific", "Tested", "Testy", "Thankful", "Thick", "Thin", "Thinkable", + "Third", "Thirsty", "Thoughtful", "Three", "Thundering", "Tidy", "Tight", "Tiny", "Tired", "Tiresome", "Toothsome", + "Torpid", "Tough", "Towering", "Tranquil", "Trashy", "Tremendous", "Tricky", "Trite", "Troubled", "Truculent", "True", + "Truthful", "Two", "Typical", "Ubiquitous", "Ugliest", "Ugly", "Ultra", "Unable", "Unadvised", "Unarmed", "Unbecoming", + "Unbiased", "Uncovered", "Understood", "Unequal", "Unequaled", "Uneven", "Unhealthy", "Unique", "Unkempt", "Unknown", "Unnatural", + "Unruly", "Unsightly", "Unsuitable", "Untidy", "Unused", "Unusual", "Unwieldy", "Unwritten", "Upbeat", "Uppity", "Upset", + "Uptight", "Used", "Useful", "Useless", "Utopian", "Utter", "Uttermost", "Vacuous", "Vagabond", "Vague", "Valuable", + "Various", "Vast", "Vengeful", "Venomous", "Verdant", "Versed", "Victorious", "Vigorous", "Violent", "Violet", "Vivacious", + "Voiceless", "Volatile", "Voracious", "Vulgar", "Wacky", "Waggish", "Waiting", "Wakeful", "Wandering", "Wanting", "Warlike", + "Warm", "Wary", "Wasteful", "Watery", "Weak", "Wealthy", "Weary", "Well-made", "Well-off", "Well-to-do", "Wet", + "Whimsical", "Whispering", "White", "Whole", "Wholesale", "Wicked", "Wide", "Wide-eyed", "Wiggly", "Wild", "Willing", + "Windy", "Wiry", "Wise", "Wistful", "Witty", "Woebegone", "Womanly", "Wonderful", "Wooden", "Woozy", "Workable", + "Worried", "Worthless", "Wrathful", "Wretched", "Wrong", "Wry", }; const char* const CNickGen::m_szNouns[] = { - "Aardvark", "Buffalo", "Alligator", "Ant", "Anteater", "Antelope", "Ape", "Armadillo", "Donkey", "Baboon", "Badger", - "Barracuda", "Bat", "Bear", "Beaver", "Bee", "Bison", "Boar", "Bush", "Butterfly", "Camel", "Calf", - "Cat", "Kitten", "Cattle", "Chamois", "Cheetah", "Chicken", "Chick", "Chimpanzee", "Infant", "Empress", "Troop", - "Cobra", "Cockroach", "Cormorant", "Cougar", "Coyote", "Crab", "Crane", "Crocodile", "Crow", "Deer", "Dog", - "Dogfish", "Dolphin", "Donkey", "Dove", "Dragonfly", "Duck", "Dugong", "Eagle", "Eaglet", "Echidna", "Eel", - "Eland", "Elephant", "Elk", "Falcon", "Ferret", "Finch", "Fly", "Fox", "Frog", "Gaur", "Gazelle", - "Gerbil", "Giant", "Giraffe", "Gnu", "Goat", "Goose", "Gorilla", "Guanaco", "Guinea", "Guineapig", "Gull", - "Hamster", "Hare", "Hawk", "Hedgehog", "Heron", "Hornet", "Horse", "Human", "Hyena", "Iguana", "Jackal", - "Jaguar", "Jellyfish", "Kangaroo", "Koala", "Komodo", "Kouprey", "Kudu", "Lark", "Lemur", "Leopard", "Lion", - "Llama", "Loris", "Louse", "Lobster", "Lyrebird", "Magpie", "Mallard", "Manatee", "Meerkat", "Mink", "Mole", - "Monkey", "Moose", "Mouse", "Mosquito", "Mule", "Okapi", "Oryx", "Ostrich", "Otter", "Owl", "Ox", - "Oyster", "Panther", "Partridge", "Peafowl", "Pelican", "Penguin", "Pig", "Pigeon", "Pony", "Porcupine", "Quelea", - "Rabbit", "Bunny", "Raccoon", "Rail", "Ram", "Rat", "Raven", "Reindeer", "Rhino", "Salamander", "Sealion", - "Seal", "Seahorse", "Seastar", "Shark", "Sheep", "Shrew", "Skunk", "Snail", "Snake", "Spider", "Squid", - "Squirrel", "Stinkbug", "Swan", "Tapir", "Tarsier", "Tiger", "Toad", "Turkey", "Turtle", "Vicuna", "Walrus", - "Wasp", "Weasel", "Whale", "Wolf", "Worm", "Yak", "Zebra", "Hat", "Cap", "Beret", "Astrakhan", - "Beanie", "Hardhat", "Pillbox", "Monkeycap", "Operahat", "Bonnet", "Bowler", "Coonskin", "Fedora", "Derby", "Montero", - "Cowboyhat", "Sombrero", "Yarmulke", "Skullcap", "Tam", "Sunbonnet", "Toque", "Tophat", "Babushka", "Balaclava", "Turban", - "Diadem", "Earmuffs", "Visor", "Scarf", "Veil", "Warbonnet", "Pithhelmet", "Hood", "Miter", "Butter", "Icecream", - "Cakebatter", "Coffee", "Tea", "Soda", "Beer", "Wine", "Cappuccino", "Jell-o", "Nougats", "Lambchops", "Steaks", - "Chowder", "Fishsoup", "Spaghetti", "Lobster", "Sushi", "Fondue", "Crabslegs", "Shrimp", "Garlic", "Onions", "Bratwurst", - "Kielbasa", "Hotdog", "Hamburger", "Herbs", "Grains", "Legumes", "Zampone", "Casserole", "Beans", "Seeds", "Stew", - "Cereal", "Polenta", "Pudding", "Pasta", "Macaroni", "Ravioli", "Wafer", "Crackers", "Cookies", "Sandwich", "Gyro", - "Wrap", "Omelet", "Popcorn", "Walnuts", "Nuts", "Almonds", "Pizza", "Mousse", "Brulee", "Cakes", "Pancake", - "Waffles", "Toast", "Candy", "Pie", "Senator", "Governor", "Councilman", "Detective", "Sleuth", "Trooper", "Musician", - "Maestro", "Conductor", "Composer", "Singer", "Architect", "Physician", "Manager", "Usher", "Painter", "Model", "Designer", - "Guest", "Attorney", "Lawyer", "Judge", "Mayor", "Therapist", "Teacher", "Principal", "Professor", "Orator", "Man", - "Woman", "Teen", "Child", "Mother", "Father", "Sister", "Brother", "Uncle", "Aunt", "Son", "Daughter", - "In-laws", "Boy", "Girl", "Nurse", "Sibling", "Settler", "Pioneer", "Waiter", "Hostess", "Host", "Cashier", - "Attendant", "Publisher", "Agent", "Witch", "Warlock", "Ghost", "Knight", "Prince", "Princess", "Maiden", "Godmother", - "Fairy", "Petal", "Sepal", "Stamen", "Pineboughs", "Bud", "Branch", "Blossom", "Fruit", "Bloom", "Tree", - "Maple", "Elm", "Oak", "Palm", "Baobab", "Mangrove", "Cyprus", "Pine", "Dogwood", "Alder", "Flowers", - "Rose", "Tulip", "Cyclamen", "Lily", "Carnations", "Wisteria", "Flytrap", "Hoe", "Weeds", "Plants", "Canes", - "Palms", "Fruit", "Apple", "Lemon", "Orange", "Grapefruit", "Tangerine", "Peach", "Tomato", "Banana", "Vegetables", - "Artichokes", "Leeks", "Lettuce", "Eggplants", "Zucchini", "Squash", "Pumpkin", "Cabbage", "Pepper", "Onion", "Garlic", - "Poison", "Venom", "Fire", "Ship", "Ferryboat", "Oceanliner", "Oars", "Sails", "Dinghy", "Yacht", "Canoe", - "Catamaran", "Gondola", "Boat", "Battleship", "Clipper", "Dhow", "Flatboat", "Houseboat", "Galleon", "Frigate", "Hydrofoil", - "Junk", "Ketch", "Yawl", "Submarine", "Schooner", "Scow", "Flatbed", "Suv", "Van", "Caboose", "Train", - "Bullet", "Metro", "Subway", "Cart", "Taxi", "Car", "Racingcar", "Buggy", "Dunebuggy", "Dragster", "Motorcycle", - "Gokart", "Limo", "Stretch", "Wagon", "Trolley", "Tram", "Bus", "Parachute", "Tractor", "Trailer", "Golfkart", - "Jeep", "Bigrig", "Bulldozer", "Dumptruck", "Jeep", "Towtruck", "Engine", "Fireengine", "Policecar", "Tank", "Locomotive", - "Ocean", "Oasis", "Sea", "Lake", "Saltlake", "Seafoam", "Waves", "Bubbles", "Current", "Waterbasin", "Bridge", - "Harbor", "Pond", "Wharf", "Pier", "Dock", "Port", "Shore", "Beach", "Sandbar", "Coast", "River", - "Brook", "Rivulet", "Puddle", "Waterfall", "Cascades", "Canal", "Channel", "Stream", "Creek", "Marsh", "Bog", - "Swamp", "Bayou", "Estuary", "Whirlpool", "Eddy", "Geyser", "Well", "Monsoon", "Hurricane", "Typhoon", "Air", - "Snow", "Rain", "Sleet", "Storm", "Hail", "Blizzard", "Wind", "Breeze", "Gale", "Whirlwind", "Maelstrom", - "Duststorm", "Cloudburst", "Tornado", "Twister", "Clouds", "Fog", "Peasoup", "Floods", "Flashflood", "Acidrain", "Tremors", - "Lightning", "Avalanche", "Eclipse", "Alpenglow", "Tsunami", "Waterspout", "Smog", "Aneroid", "Barometer", "Radiosonde", "Station", - "Map", "Chalice", "Bijou", "Candelabra", "Menorah", "Curio", "Figurine", "Music-box", "Objetd'art", "Trinket", "Trims", - "Windchimes", "Birdcage", "Birdbath", "Cans", "Urn", "Bucket", "Arrow", "Bow", "Sword", "Dart", "Epee", - "Dagger", "Hatchet", "Pickax", "Dolls", "Broom", "Mop", "Pail", "Squeegee", "Caddy", "Telephone", "Pipe", - "Paints", "Brushes", "Easel", "Canvas", "Trunk", "Hook", "Gun", "Glue", "Tissue", "Toilet", "Kleenex", - "Papertowel", "Ropes", "Rubber", "Coil", "Toys", "Dogleash", "Balloon", "Vases", "Planters", "Pen", "Pad", - "Typewriter", "Computer", "Laptop", "Netbook", "Stylus", "Pencil", "Desk", "Backpack", "Shoerack", "Notebook", "Vellum", - "Chalk", "Badge", "Saddle", "Spurs", "Paper", "Rollbook", "Guestbook", "Pot", "Pen", "Plate", "Dishes", - "Fork", "Spoons", "Knives", "Knife", "Samovar", "Sky", "Forest", "Heaven", "Hell", "Earth", "Sun", - "Star", "Planet", "Mercury", "Venus", "Earth", "Mars", "Jupiter", "Saturn", "Uranus", "Neptune", "Ceres", - "Pluto", "Haumea", "Makemake", "Eris", "Outerspace", "Town", "Village", "City", "Country", "Farm", "Suburb", - "Roads", "Streets", "Blocks", "Zoo", "Park", "Museum", "Cemetery", "Tunnels", "Caves", "Churches", "Temples", - "Mall", "Dresser", "Armoire", "Chiffonier", "Credenza", "Console", "Bookcase", "Buffet", "Armchair", "Recliner", "Easychair", - "Bench", "Banquette", "Chair", "Couch", "Davenport", "Sofa", "Armchair", "Ottoman", "Deckchair", "Loveseat", "Highseat", - "Divan", "Inglenook", "Pew", "Throne", "Sectional", "Stool", "Pottychair", "Workbench", "Nighttable", "Bed", "Daybed", - "Bassinet", "Crib", "Cradle", "Cot", "Futon", "Hammock", "Tatamimat", "Waterbed", "Trundlebed", "Hassock", "Hatrack", - "Stepstool", "Footrest", "Footstool", "Tripod", "Mirror", "Nightlight", "Torchiere", "Sunlamp", "Spotlight", "Ceilingfan", "Cupboard", - "Cardtable", "Hutch", "Locker", "Wetbar", "Vanity", "Rack", "Hopechest", "Sculpture", "Painting", "Eye", "Pupil", - "Iris", "Retina", "Eyeball", "Eyelids", "Eyelashes", "Eyebrows", "Lap", "Waist", "Belly", "Tummy", "Rearend", - "Crotch", "Abdomen", "Beard", "Mustache", "Sideburns", "Fingernail", "Hand", "Forearm", "Arm", "Knuckles", "Thumb", - "Wrist", "Elbow", "Leg", "Toes", "Knee", "Ankle", "Shin", "Thigh", "Hip", "Breast", "Chest", - "Torso", "Tongue", "Lips", "Gums", "Mouth", "Teeth", "Bones", "Spine", "Throat", "Lungs", "Kidneys", - "Intestines", "Colon", "Spleen", "Glands", "Blood", "Head", "Skull", "Brain", "Muscle", "Hair", "Xylophone", - "Clavier", "Virginal", "Lute", "Drum", "Frenchhorn", "Piano", "Violin", "Cello", "Guitar", "Flute", "Tuba", - "Harp", "Mariachi", "Orchestra", "Oboe", "Bassoon", "Woodwinds", "Brass", "Viola", "Kettledrum", "Peyotedrum", "Tambourine", - "Tambour", "Xylophone", "Saxophone", "Marimba", "Maracas", "Shofar", "Cymbals", "Kazoo", "Dulcimer", "Accordion", "Lyre", - "Fiddle", "Banjo", "Balalaika", "Sitar", "Ukulele", "Zither", "Bagpipes", "Piccolo", "Clarinet", "Cornet", "Panpipe", - "Tuningfork", "Metronome", "Castanets", "Woofer", "Sniper", "Marksman", "Cleaner", "Pyro", "Attacker", "Mechanic", "Janitor", - "Scrubber", "Garbageman", "Technician", "Ninja", "Medic", "Spy", "Assassin", "Gunman", "Triggerman", "Butcher", "Killer", - "Dodger", "Booger", "Mechanic", "Engineer", "Doctor", "Surgeon", "Fighter", "Shooter", "Gunner", "Soldier", "Officer", - "Veteran", "Scout", "Mercenary", "Commando", "Cadet", "Guard", "Warrior", "Trooper", "Gambler", "Specialist", "Shaper", - "Finisher", "Gladiator", "Boxer", "Wrestler", "Warlord", "Rival", "Armory", "Agent", "Rebel", "Brawler", "Bruiser", - "Bully", "Champion", "Hero", "Battler", "Combatant", "Fencer", "Swordsman", "Expert", "Gangster", "Gangsta", "Bandit", - "Hoodlum", "Mobster", "Robber", "Thief", "Burglar", "Pirate", "Thug", "Hitman", "Hitperson", "Dealer", "Desperado", - "Criminal", "Crook", "Hijacker", "Carjacker", "Villain", "Convict", "Fugitive", "Mug", "Outlaw", "Ruffian", "Cutthroat", - "Devil", "Murderer", "Psycho", "Punk", "ASBO", "Offender", "Drifter", "Rioter", "Goon", "Roughneck", "Brute", - "Hacker", "Cabbie", "Wheeler", "Driver", "Rider", "Cyclist", "Cowboy", "Operative", "Carrier", "Transporter", "Trucker", - "Conductor", "Wheelman", "Vampire", "Parasite", "Tramp", "Bum", "Hobo", "Hitchhiker", "Deadbeat", "Acrobat", + "Aardvark", "Buffalo", "Alligator", "Ant", "Anteater", "Antelope", "Ape", "Armadillo", "Donkey", "Baboon", "Badger", + "Barracuda", "Bat", "Bear", "Beaver", "Bee", "Bison", "Boar", "Bush", "Butterfly", "Camel", "Calf", + "Cat", "Kitten", "Cattle", "Chamois", "Cheetah", "Chicken", "Chick", "Chimpanzee", "Infant", "Empress", "Troop", + "Cobra", "Cockroach", "Cormorant", "Cougar", "Coyote", "Crab", "Crane", "Crocodile", "Crow", "Deer", "Dog", + "Dogfish", "Dolphin", "Dove", "Dragonfly", "Duck", "Dugong", "Eagle", "Eaglet", "Echidna", "Eel", "Eland", + "Elephant", "Elk", "Falcon", "Ferret", "Finch", "Fly", "Fox", "Frog", "Gaur", "Gazelle", "Gerbil", + "Giant", "Giraffe", "Gnu", "Goat", "Goose", "Gorilla", "Guanaco", "Guinea", "Guineapig", "Gull", "Hamster", + "Hare", "Hawk", "Hedgehog", "Heron", "Hornet", "Horse", "Human", "Hyena", "Iguana", "Jackal", "Jaguar", + "Jellyfish", "Kangaroo", "Koala", "Komodo", "Kouprey", "Kudu", "Lark", "Lemur", "Leopard", "Lion", "Llama", + "Loris", "Louse", "Lobster", "Lyrebird", "Magpie", "Mallard", "Manatee", "Meerkat", "Mink", "Mole", "Monkey", + "Moose", "Mouse", "Mosquito", "Mule", "Okapi", "Oryx", "Ostrich", "Otter", "Owl", "Ox", "Oyster", + "Panther", "Partridge", "Peafowl", "Pelican", "Penguin", "Pig", "Pigeon", "Pony", "Porcupine", "Quelea", "Rabbit", + "Bunny", "Raccoon", "Rail", "Ram", "Rat", "Raven", "Reindeer", "Rhino", "Salamander", "Sealion", "Seal", + "Seahorse", "Seastar", "Shark", "Sheep", "Shrew", "Skunk", "Snail", "Snake", "Spider", "Squid", "Squirrel", + "Stinkbug", "Swan", "Tapir", "Tarsier", "Tiger", "Toad", "Turkey", "Turtle", "Vicuna", "Walrus", "Wasp", + "Weasel", "Whale", "Wolf", "Worm", "Yak", "Zebra", "Hat", "Cap", "Beret", "Astrakhan", "Beanie", + "Hardhat", "Pillbox", "Monkeycap", "Operahat", "Bonnet", "Bowler", "Coonskin", "Fedora", "Derby", "Montero", "Cowboyhat", + "Sombrero", "Yarmulke", "Skullcap", "Tam", "Sunbonnet", "Toque", "Tophat", "Babushka", "Balaclava", "Turban", "Diadem", + "Earmuffs", "Visor", "Scarf", "Veil", "Warbonnet", "Pithhelmet", "Hood", "Miter", "Butter", "Icecream", "Cakebatter", + "Coffee", "Tea", "Soda", "Beer", "Wine", "Cappuccino", "Jell-o", "Nougats", "Lambchops", "Steaks", "Chowder", + "Fishsoup", "Spaghetti", "Sushi", "Fondue", "Crabslegs", "Shrimp", "Onions", "Bratwurst", "Kielbasa", "Hotdog", "Hamburger", + "Herbs", "Grains", "Legumes", "Zampone", "Casserole", "Beans", "Seeds", "Stew", "Cereal", "Polenta", "Pudding", + "Pasta", "Macaroni", "Ravioli", "Wafer", "Crackers", "Cookies", "Sandwich", "Gyro", "Wrap", "Omelet", "Popcorn", + "Walnuts", "Nuts", "Almonds", "Pizza", "Mousse", "Brulee", "Cakes", "Pancake", "Waffles", "Toast", "Candy", + "Pie", "Senator", "Governor", "Councilman", "Detective", "Sleuth", "Musician", "Maestro", "Conductor", "Composer", "Singer", + "Architect", "Physician", "Manager", "Usher", "Painter", "Model", "Designer", "Guest", "Attorney", "Lawyer", "Judge", + "Mayor", "Therapist", "Teacher", "Principal", "Professor", "Orator", "Man", "Woman", "Teen", "Child", "Mother", + "Father", "Sister", "Brother", "Uncle", "Aunt", "Son", "Daughter", "In-laws", "Boy", "Girl", "Nurse", + "Sibling", "Settler", "Pioneer", "Waiter", "Hostess", "Host", "Cashier", "Attendant", "Publisher", "Witch", "Warlock", + "Ghost", "Knight", "Prince", "Princess", "Maiden", "Godmother", "Fairy", "Petal", "Sepal", "Stamen", "Pineboughs", + "Bud", "Branch", "Blossom", "Fruit", "Bloom", "Tree", "Maple", "Elm", "Oak", "Palm", "Baobab", + "Mangrove", "Cyprus", "Pine", "Dogwood", "Alder", "Flowers", "Rose", "Tulip", "Cyclamen", "Lily", "Carnations", + "Wisteria", "Flytrap", "Hoe", "Weeds", "Plants", "Canes", "Palms", "Apple", "Lemon", "Orange", "Grapefruit", + "Tangerine", "Peach", "Tomato", "Banana", "Vegetables", "Artichokes", "Leeks", "Lettuce", "Eggplants", "Zucchini", "Squash", + "Pumpkin", "Cabbage", "Pepper", "Onion", "Garlic", "Poison", "Venom", "Fire", "Ship", "Ferryboat", "Oceanliner", + "Oars", "Sails", "Dinghy", "Yacht", "Canoe", "Catamaran", "Gondola", "Boat", "Battleship", "Clipper", "Dhow", + "Flatboat", "Houseboat", "Galleon", "Frigate", "Hydrofoil", "Junk", "Ketch", "Yawl", "Submarine", "Schooner", "Scow", + "Flatbed", "Suv", "Van", "Caboose", "Train", "Bullet", "Metro", "Subway", "Cart", "Taxi", "Car", + "Racingcar", "Buggy", "Dunebuggy", "Dragster", "Motorcycle", "Gokart", "Limo", "Stretch", "Wagon", "Trolley", "Tram", + "Bus", "Parachute", "Tractor", "Trailer", "Golfkart", "Jeep", "Bigrig", "Bulldozer", "Dumptruck", "Towtruck", "Engine", + "Fireengine", "Policecar", "Tank", "Locomotive", "Ocean", "Oasis", "Sea", "Lake", "Saltlake", "Seafoam", "Waves", + "Bubbles", "Current", "Waterbasin", "Bridge", "Harbor", "Pond", "Wharf", "Pier", "Dock", "Port", "Shore", + "Beach", "Sandbar", "Coast", "River", "Brook", "Rivulet", "Puddle", "Waterfall", "Cascades", "Canal", "Channel", + "Stream", "Creek", "Marsh", "Bog", "Swamp", "Bayou", "Estuary", "Whirlpool", "Eddy", "Geyser", "Well", + "Monsoon", "Hurricane", "Typhoon", "Air", "Snow", "Rain", "Sleet", "Storm", "Hail", "Blizzard", "Wind", + "Breeze", "Gale", "Whirlwind", "Maelstrom", "Duststorm", "Cloudburst", "Tornado", "Twister", "Clouds", "Fog", "Peasoup", + "Floods", "Flashflood", "Acidrain", "Tremors", "Lightning", "Avalanche", "Eclipse", "Alpenglow", "Tsunami", "Waterspout", "Smog", + "Aneroid", "Barometer", "Radiosonde", "Station", "Map", "Chalice", "Bijou", "Candelabra", "Menorah", "Curio", "Figurine", + "Music-box", "Objetd'art", "Trinket", "Trims", "Windchimes", "Birdcage", "Birdbath", "Cans", "Urn", "Bucket", "Arrow", + "Bow", "Sword", "Dart", "Epee", "Dagger", "Hatchet", "Pickax", "Dolls", "Broom", "Mop", "Pail", + "Squeegee", "Caddy", "Telephone", "Pipe", "Paints", "Brushes", "Easel", "Canvas", "Trunk", "Hook", "Gun", + "Glue", "Tissue", "Toilet", "Kleenex", "Papertowel", "Ropes", "Rubber", "Coil", "Toys", "Dogleash", "Balloon", + "Vases", "Planters", "Pen", "Pad", "Typewriter", "Computer", "Laptop", "Netbook", "Stylus", "Pencil", "Desk", + "Backpack", "Shoerack", "Notebook", "Vellum", "Chalk", "Badge", "Saddle", "Spurs", "Paper", "Rollbook", "Guestbook", + "Pot", "Plate", "Dishes", "Fork", "Spoons", "Knives", "Knife", "Samovar", "Sky", "Forest", "Heaven", + "Hell", "Earth", "Sun", "Star", "Planet", "Mercury", "Venus", "Mars", "Jupiter", "Saturn", "Uranus", + "Neptune", "Ceres", "Pluto", "Haumea", "Makemake", "Eris", "Outerspace", "Town", "Village", "City", "Country", + "Farm", "Suburb", "Roads", "Streets", "Blocks", "Zoo", "Park", "Museum", "Cemetery", "Tunnels", "Caves", + "Churches", "Temples", "Mall", "Dresser", "Armoire", "Chiffonier", "Credenza", "Console", "Bookcase", "Buffet", "Armchair", + "Recliner", "Easychair", "Bench", "Banquette", "Chair", "Couch", "Davenport", "Sofa", "Ottoman", "Deckchair", "Loveseat", + "Highseat", "Divan", "Inglenook", "Pew", "Throne", "Sectional", "Stool", "Pottychair", "Workbench", "Nighttable", "Bed", + "Daybed", "Bassinet", "Crib", "Cradle", "Cot", "Futon", "Hammock", "Tatamimat", "Waterbed", "Trundlebed", "Hassock", + "Hatrack", "Stepstool", "Footrest", "Footstool", "Tripod", "Mirror", "Nightlight", "Torchiere", "Sunlamp", "Spotlight", "Ceilingfan", + "Cupboard", "Cardtable", "Hutch", "Locker", "Wetbar", "Vanity", "Rack", "Hopechest", "Sculpture", "Painting", "Eye", + "Pupil", "Iris", "Retina", "Eyeball", "Eyelids", "Eyelashes", "Eyebrows", "Lap", "Waist", "Belly", "Tummy", + "Rearend", "Crotch", "Abdomen", "Beard", "Mustache", "Sideburns", "Fingernail", "Hand", "Forearm", "Arm", "Knuckles", + "Thumb", "Wrist", "Elbow", "Leg", "Toes", "Knee", "Ankle", "Shin", "Thigh", "Hip", "Breast", + "Chest", "Torso", "Tongue", "Lips", "Gums", "Mouth", "Teeth", "Bones", "Spine", "Throat", "Lungs", + "Kidneys", "Intestines", "Colon", "Spleen", "Glands", "Blood", "Head", "Skull", "Brain", "Muscle", "Hair", + "Xylophone", "Clavier", "Virginal", "Lute", "Drum", "Frenchhorn", "Piano", "Violin", "Cello", "Guitar", "Flute", + "Tuba", "Harp", "Mariachi", "Orchestra", "Oboe", "Bassoon", "Woodwinds", "Brass", "Viola", "Kettledrum", "Peyotedrum", + "Tambourine", "Tambour", "Saxophone", "Marimba", "Maracas", "Shofar", "Cymbals", "Kazoo", "Dulcimer", "Accordion", "Lyre", + "Fiddle", "Banjo", "Balalaika", "Sitar", "Ukulele", "Zither", "Bagpipes", "Piccolo", "Clarinet", "Cornet", "Panpipe", + "Tuningfork", "Metronome", "Castanets", "Woofer", "Sniper", "Marksman", "Cleaner", "Pyro", "Attacker", "Mechanic", "Janitor", + "Scrubber", "Garbageman", "Technician", "Ninja", "Medic", "Spy", "Assassin", "Gunman", "Triggerman", "Butcher", "Killer", + "Dodger", "Booger", "Engineer", "Doctor", "Surgeon", "Fighter", "Shooter", "Gunner", "Soldier", "Officer", "Veteran", + "Scout", "Mercenary", "Commando", "Cadet", "Guard", "Warrior", "Trooper", "Gambler", "Specialist", "Shaper", "Finisher", + "Gladiator", "Boxer", "Wrestler", "Warlord", "Rival", "Armory", "Agent", "Rebel", "Brawler", "Bruiser", "Bully", + "Champion", "Hero", "Battler", "Combatant", "Fencer", "Swordsman", "Expert", "Gangster", "Gangsta", "Bandit", "Hoodlum", + "Mobster", "Robber", "Thief", "Burglar", "Pirate", "Thug", "Hitman", "Hitperson", "Dealer", "Desperado", "Criminal", + "Crook", "Hijacker", "Carjacker", "Villain", "Convict", "Fugitive", "Mug", "Outlaw", "Ruffian", "Cutthroat", "Devil", + "Murderer", "Psycho", "Punk", "ASBO", "Offender", "Drifter", "Rioter", "Goon", "Roughneck", "Brute", "Hacker", + "Cabbie", "Wheeler", "Driver", "Rider", "Cyclist", "Cowboy", "Operative", "Carrier", "Transporter", "Trucker", "Wheelman", + "Vampire", "Parasite", "Tramp", "Bum", "Hobo", "Hitchhiker", "Deadbeat", "Acrobat", }; SString CNickGen::GetRandomNickname() diff --git a/Client/core/CQueryReceiver.cpp b/Client/core/CQueryReceiver.cpp index c0a1cf1125..559691bcb3 100644 --- a/Client/core/CQueryReceiver.cpp +++ b/Client/core/CQueryReceiver.cpp @@ -183,7 +183,7 @@ SQueryInfo CQueryReceiver::GetServerResponse() // Recover server ping status if present const SString strPingStatus = strBuildNumber.Right(strBuildNumber.length() - strlen(strBuildNumber) - 1); - CCore::GetSingleton().GetNetwork()->UpdatePingStatus(*strPingStatus, info.players); + CCore::GetSingleton().GetNetwork()->UpdatePingStatus(*strPingStatus, info.players, info.isStatusVerified); // Recover server http port if present const SString strNetRoute = strPingStatus.Right(strPingStatus.length() - strlen(strPingStatus) - 1); @@ -213,7 +213,15 @@ SQueryInfo CQueryReceiver::GetServerResponse() return info; } } + InvalidateSocket(); + + if (info.players > info.playerSlot) + { + info.players = info.playerSlot; + info.isStatusVerified = false; + } + info.containingInfo = true; } diff --git a/Client/core/CQueryReceiver.h b/Client/core/CQueryReceiver.h index f55e1004f4..4bc56b90d7 100644 --- a/Client/core/CQueryReceiver.h +++ b/Client/core/CQueryReceiver.h @@ -16,6 +16,7 @@ struct SQueryInfo { containingInfo = false; port = 0; + isStatusVerified = true; isPassworded = false; serials = false; players = 0; @@ -33,6 +34,7 @@ struct SQueryInfo SString gameType; SString mapName; SString versionText; + bool isStatusVerified; bool isPassworded; bool serials; ushort players; diff --git a/Client/core/CVersionUpdater.cpp b/Client/core/CVersionUpdater.cpp index e4fe77ec96..ec24655b26 100644 --- a/Client/core/CVersionUpdater.cpp +++ b/Client/core/CVersionUpdater.cpp @@ -1912,7 +1912,7 @@ void CVersionUpdater::_DialogUpdateQueryError() // Display message GetQuestionBox().Reset(); GetQuestionBox().SetTitle(_("UPDATE CHECK")); - GetQuestionBox().SetMessage(_("Update not currently avalable.\n\nPlease check www.mtasa.com")); + GetQuestionBox().SetMessage(_("An update is currently not available.\n\nPlease check www.mtasa.com")); GetQuestionBox().SetButton(0, _("OK")); GetQuestionBox().Show(); _PollAnyButton(); diff --git a/Client/core/ServerBrowser/CServerBrowser.cpp b/Client/core/ServerBrowser/CServerBrowser.cpp index 764078e563..1246276b70 100644 --- a/Client/core/ServerBrowser/CServerBrowser.cpp +++ b/Client/core/ServerBrowser/CServerBrowser.cpp @@ -1081,7 +1081,8 @@ void CServerBrowser::AddServerToList(CServerListItem* pServer, const ServerBrows const SString strVersion = !bIncludeOtherVersions ? "" : pServer->strVersion; const SString strVersionSortKey = pServer->strVersionSortKey + pServer->strTieBreakSortKey; - const SString strPlayers = pServer->nMaxPlayers == 0 ? "" : SString("%d / %d", pServer->nPlayers, pServer->nMaxPlayers); + const SString strVerified = pServer->isStatusVerified ? "" : "*"; + const SString strPlayers = pServer->nMaxPlayers == 0 ? "" : SString("%d / %d %s", pServer->nPlayers, pServer->nMaxPlayers, *strVerified); const SString strPlayersSortKey = SString("%04d-", pServer->nMaxPlayers ? pServer->nPlayers + 1 : 0) + pServer->strTieBreakSortKey; const SString strPing = pServer->nPing == 9999 ? "" : SString("%d", pServer->nPing); @@ -1125,6 +1126,12 @@ void CServerBrowser::AddServerToList(CServerListItem* pServer, const ServerBrows m_pServerList[Type]->SetItemColor(iIndex, m_hPing[Type], color.R, color.G, color.B, color.A); m_pServerList[Type]->SetItemColor(iIndex, m_hGame[Type], color.R, color.G, color.B, color.A); + if (!pServer->isStatusVerified) + { + SColor orange = SColorRGBA(230, 200, 180, color.A); + m_pServerList[Type]->SetItemColor(iIndex, m_hPlayers[Type], orange.R, orange.G, orange.B, orange.A); + } + // If the index was modified from the original, then update all indexes because it means there was some sort if (pServer->iRowIndex != iIndex) UpdateRowIndexMembers(Type); diff --git a/Client/core/ServerBrowser/CServerInfo.cpp b/Client/core/ServerBrowser/CServerInfo.cpp index 2b79599c8d..6571fedc32 100644 --- a/Client/core/ServerBrowser/CServerInfo.cpp +++ b/Client/core/ServerBrowser/CServerInfo.cpp @@ -469,13 +469,15 @@ void CServerInfo::Connect() void CServerInfo::ResetServerGUI(CServerListItem* pServer) { + const SString strVerified = pServer->isStatusVerified ? "" : "*"; + // Set our GUI elements to display the server information m_pServerNameLabel->SetText(pServer->strName.c_str()); m_pServerAddressLabel->SetText(pServer->strEndpoint.c_str()); m_pGamemodeLabel->SetText(pServer->strGameMode.c_str()); m_pMapLabel->SetText(pServer->strMap.c_str()); - m_pPlayersLabel->SetText(SString("%i/%i", pServer->nPlayers, pServer->nMaxPlayers).c_str()); - + m_pPlayersLabel->SetText(SString("%d / %d %s", pServer->nPlayers, pServer->nMaxPlayers, *strVerified).c_str()); + m_pPasswordedLabel->SetText(pServer->bPassworded ? _("Yes") : _("No")); m_pLatencyLabel->SetText(SString("%i", pServer->nPing)); diff --git a/Client/core/ServerBrowser/CServerList.cpp b/Client/core/ServerBrowser/CServerList.cpp index 021328d777..044f88e496 100644 --- a/Client/core/ServerBrowser/CServerList.cpp +++ b/Client/core/ServerBrowser/CServerList.cpp @@ -514,6 +514,7 @@ bool CServerListItem::ParseQuery() if ((uiMasterServerSaysRestrictions & RESTRICTION_PLAYER_LIST) == false) vecPlayers = info.playersPool; + isStatusVerified = info.isStatusVerified; bScanned = true; PostChange(); diff --git a/Client/core/ServerBrowser/CServerList.h b/Client/core/ServerBrowser/CServerList.h index e2f0b2864f..5d0e450873 100644 --- a/Client/core/ServerBrowser/CServerList.h +++ b/Client/core/ServerBrowser/CServerList.h @@ -139,6 +139,7 @@ class CServerListItem bScanned = false; bSkipped = false; bSerials = false; + isStatusVerified = true; bPassworded = false; bKeepFlag = false; iRowIndex = -1; @@ -182,6 +183,7 @@ class CServerListItem unsigned short nPlayers; // Current players unsigned short nMaxPlayers; // Maximum players unsigned short nPing; // Ping time + bool isStatusVerified; // Ping status verified bool bPassworded; // Password protected bool bSerials; // Serial verification on bool bScanned; diff --git a/Client/game_sa/CAnimBlendAssociationSA.cpp b/Client/game_sa/CAnimBlendAssociationSA.cpp index 5496d2ebff..3f9a3ac94f 100644 --- a/Client/game_sa/CAnimBlendAssociationSA.cpp +++ b/Client/game_sa/CAnimBlendAssociationSA.cpp @@ -113,6 +113,11 @@ std::unique_ptr CAnimBlendAssociationSA::GetAnimHierarchy() return pGame->GetAnimManager()->GetAnimBlendHierarchy(m_pInterface->pAnimHierarchy); } +const std::unique_ptr CAnimBlendAssociationSA::GetAnimHierarchy() const noexcept +{ + return pGame->GetAnimManager()->GetAnimBlendHierarchy(m_pInterface->pAnimHierarchy); +} + void CAnimBlendAssociationSA::SetCurrentProgress(float fProgress) { float fTime = m_pInterface->pAnimHierarchy->fTotalTime * fProgress; diff --git a/Client/game_sa/CAnimBlendAssociationSA.h b/Client/game_sa/CAnimBlendAssociationSA.h index 13b37e86f2..715ee41c28 100644 --- a/Client/game_sa/CAnimBlendAssociationSA.h +++ b/Client/game_sa/CAnimBlendAssociationSA.h @@ -16,6 +16,7 @@ #include #include #include +#include #include "CAnimBlendNodeSA.h" class CAnimBlendAssocGroupSA; @@ -159,12 +160,15 @@ class CAnimBlendAssociationSA : public CAnimBlendAssociation eAnimGroup GetAnimGroup() { return static_cast(m_pInterface->sAnimGroup); } eAnimID GetAnimID() { return static_cast(m_pInterface->sAnimID); } std::unique_ptr GetAnimHierarchy(); + const std::unique_ptr GetAnimHierarchy() const noexcept; float GetBlendAmount() { return m_pInterface->fBlendAmount; } void SetBlendAmount(float fAmount) { m_pInterface->fBlendAmount = fAmount; } void SetCurrentProgress(float fProgress); - float GetCurrentSpeed() { return m_pInterface->fSpeed; } + float GetCurrentProgress() const noexcept { return m_pInterface->fCurrentTime; } + float GetCurrentSpeed() const noexcept { return m_pInterface->fSpeed; } void SetCurrentSpeed(float fSpeed) { m_pInterface->fSpeed = fSpeed; } + float GetLength() const noexcept { return GetAnimHierarchy()->GetTotalTime(); } void SetAnimID(short sAnimID) { m_pInterface->sAnimID = sAnimID; } void SetAnimGroup(short sAnimGroup) { m_pInterface->sAnimGroup = sAnimGroup; } void SetFlags(short sFlags) { m_pInterface->m_nFlags = sFlags; } diff --git a/Client/game_sa/CAnimBlendHierarchySA.h b/Client/game_sa/CAnimBlendHierarchySA.h index 585a0bb1fd..2adf4c070f 100644 --- a/Client/game_sa/CAnimBlendHierarchySA.h +++ b/Client/game_sa/CAnimBlendHierarchySA.h @@ -53,6 +53,7 @@ class CAnimBlendHierarchySA : public CAnimBlendHierarchy void RemoveFromUncompressedCache(); void RemoveQuaternionFlips(); void CalculateTotalTime(); + float GetTotalTime() const noexcept { return m_pInterface->fTotalTime; } CAnimBlendSequenceSAInterface* GetSequence(DWORD dwIndex); CAnimBlendSequenceSAInterface* GetSequences() { return m_pInterface->pSequences; } unsigned short GetNumSequences() { return m_pInterface->usNumSequences; } diff --git a/Client/game_sa/CAutomobileSA.h b/Client/game_sa/CAutomobileSA.h index 701030a5a9..921c6638b3 100644 --- a/Client/game_sa/CAutomobileSA.h +++ b/Client/game_sa/CAutomobileSA.h @@ -21,39 +21,6 @@ #define MAX_PASSENGER_COUNT 8 #define MAX_DOORS 6 // also in CDamageManager -namespace eCarNode -{ - enum - { - NONE = 0, - CHASSIS = 1, - WHEEL_RF = 2, - WHEEL_RM = 3, - WHEEL_RB = 4, - WHEEL_LF = 5, - WHEEL_LM = 6, - WHEEL_LB = 7, - DOOR_RF = 8, - DOOR_RR = 9, - DOOR_LF = 10, - DOOR_LR = 11, - BUMP_FRONT = 12, - BUMP_REAR = 13, - WING_RF = 14, - WING_LF = 15, - BONNET = 16, - BOOT = 17, - WINDSCREEN = 18, - EXHAUST = 19, - MISC_A = 20, - MISC_B = 21, - MISC_C = 22, - MISC_D = 23, - MISC_E = 24, - NUM_NODES - }; -}; - class CBouncingPanelSAInterface { public: @@ -70,7 +37,7 @@ class CAutomobileSAInterface : public CVehicleSAInterface public: CDamageManagerSAInterface m_damageManager; CDoorSAInterface m_doors[MAX_DOORS]; - RwFrame* m_aCarNodes[eCarNode::NUM_NODES]; + RwFrame* m_aCarNodes[static_cast(eCarNodes::NUM_NODES)]; CBouncingPanelSAInterface m_panels[3]; CDoorSAInterface m_swingingChassis; CColPointSAInterface m_wheelColPoint[MAX_WHEELS]; diff --git a/Client/game_sa/CBikeSA.h b/Client/game_sa/CBikeSA.h index 65602ae525..083592e5fd 100644 --- a/Client/game_sa/CBikeSA.h +++ b/Client/game_sa/CBikeSA.h @@ -14,6 +14,22 @@ #include #include "CVehicleSA.h" +enum class eBikeNodes +{ + NONE = 0, + CHASSIS, + FORKS_FRONT, + FORKS_REAR, + WHEEL_FRONT, + WHEEL_REAR, + MUDGUARD, + HANDLEBARS, + MISC_A, + MISC_B, + + NUM_NODES +}; + struct sRideAnimData { int32 iAnimGroup; @@ -29,7 +45,7 @@ static_assert(sizeof(sRideAnimData) == 0x1C, "Invalid size for sRideAnimData"); class CBikeSAInterface : public CVehicleSAInterface { public: - int32 m_apModelNodes[10]; + RwFrame* m_apModelNodes[static_cast(eBikeNodes::NUM_NODES)]; int8 m_bLeanMatrixCalculated; int8 pad0[3]; // Maybe prev value is int32 int8 m_mLeanMatrix[72]; diff --git a/Client/game_sa/CBmxSA.h b/Client/game_sa/CBmxSA.h index 250a8bd5e6..dd64755c6d 100644 --- a/Client/game_sa/CBmxSA.h +++ b/Client/game_sa/CBmxSA.h @@ -14,6 +14,22 @@ #include #include "CBikeSA.h" +enum class eBmxNodes +{ + NONE = 0, + CHASSIS, + FORKS_FRONT, + FORKS_REAR, + WHEEL_FRONT, + WHEEL_REAR, + HANDLEBARS, + CHAINSET, + PEDAL_R, + PEDAL_L, + + NUM_NODES +}; + class CBmxSAInterface : public CBikeSAInterface { // fill this diff --git a/Client/game_sa/CBoatSA.h b/Client/game_sa/CBoatSA.h index 34f90003c7..6df3268bf0 100644 --- a/Client/game_sa/CBoatSA.h +++ b/Client/game_sa/CBoatSA.h @@ -14,12 +14,30 @@ #include #include "CVehicleSA.h" +enum class eBoatNodes +{ + NONE = 0, + MOVING, + WINDSCREEN, + RUDDER, + FLAP_LEFT, + FLAP_RIGHT, + REARFLAP_LEFT, + REARFLAP_RIGHT, + STATIC_PROP, + MOVING_PROP, + STATIC_PROP2, + MOVING_PROP2, + + NUM_NODES +}; + class CBoatSAInterface : public CVehicleSAInterface { public: uint32 pad1[3]; // 1440 uint32 BoatFlags; // 1452 - RwFrame* pBoatParts[11]; // 1456 [[ find out correct size + RwFrame* pBoatParts[static_cast(eBoatNodes::NUM_NODES)]; // 1456 uint32 pad2[3]; // 1500 uint16 pad3; // 1512 uint8 pad4[2]; // 1514 diff --git a/Client/game_sa/CBuildingsPoolSA.cpp b/Client/game_sa/CBuildingsPoolSA.cpp index b8363f6507..50ae14bb3c 100644 --- a/Client/game_sa/CBuildingsPoolSA.cpp +++ b/Client/game_sa/CBuildingsPoolSA.cpp @@ -101,7 +101,14 @@ void CBuildingsPoolSA::RemoveBuilding(CBuilding* pBuilding) // Remove plant pGame->GetPlantManager()->RemovePlant(pInterface); - RemoveBuildingFromWorld(pInterface); + // Remove shadow + pInterface->RemoveShadows(); + + // Remove building from world + pGame->GetWorld()->Remove(pInterface, CBuildingPool_Destructor); + + // Call virtual destructor + ((void*(__thiscall*)(void*, char))pInterface->vtbl->SCALAR_DELETING_DESTRUCTOR)(pInterface, 0); // Remove col reference auto modelInfo = pGame->GetModelInfo(pBuilding->GetModelIndex()); @@ -144,6 +151,9 @@ void CBuildingsPoolSA::RemoveAllBuildings() RemoveBuildingFromWorld(building); + if (building->HasMatrix()) + building->RemoveMatrix(); + pBuildsingsPool->Release(i); (*m_pOriginalBuildingsBackup)[i].first = true; diff --git a/Client/game_sa/CCameraSA.cpp b/Client/game_sa/CCameraSA.cpp index 960ec7cfa7..2e8f6b6eb8 100644 --- a/Client/game_sa/CCameraSA.cpp +++ b/Client/game_sa/CCameraSA.cpp @@ -458,3 +458,8 @@ void CCameraSA::ResetShakeCamera() noexcept { GetInterface()->m_fCamShakeForce = 0.0f; } + +std::uint8_t CCameraSA::GetTransitionState() +{ + return GetInterface()->m_uiTransitionState; +} diff --git a/Client/game_sa/CCameraSA.h b/Client/game_sa/CCameraSA.h index 246f3362d8..6ccf5fe471 100644 --- a/Client/game_sa/CCameraSA.h +++ b/Client/game_sa/CCameraSA.h @@ -82,6 +82,7 @@ class CCameraSAInterface public: // CPlaceable CPlaceableSAInterface Placeable; + std::uint8_t specialPadding[4]; // Temporary padding due to incorrect CPlaceableSAInterface class // End CPlaceable // move these out the class, have decided to set up a mirrored enumerated type thingy at the top @@ -131,16 +132,6 @@ class CCameraSAInterface bool m_bCooperativeCamMode; bool m_bAllowShootingWith2PlayersInCar; bool m_bDisableFirstPersonInCar; - static bool m_bUseMouse3rdPerson; -#ifndef FINALBUILD - bool bStaticFrustum; -#endif - - // for debug keyboard stuff -#ifndef MASTER - unsigned char display_kbd_debug; - float kbd_fov_value; -#endif // MASTER // The following fields allow the level designers to specify the camera for 2 player games. short m_ModeForTwoPlayersSeparateCars; @@ -430,4 +421,6 @@ class CCameraSA : public CCamera void ShakeCamera(float radius, float x, float y, float z) noexcept override; void ResetShakeCamera() noexcept override; + + std::uint8_t GetTransitionState(); }; diff --git a/Client/game_sa/CEntitySA.cpp b/Client/game_sa/CEntitySA.cpp index 4466a53fe4..02a9f00380 100644 --- a/Client/game_sa/CEntitySA.cpp +++ b/Client/game_sa/CEntitySA.cpp @@ -603,55 +603,97 @@ bool CEntitySA::GetBoneRotation(eBone boneId, float& yaw, float& pitch, float& r return false; } +bool CEntitySA::GetBoneRotationQuat(eBone boneId, float& x, float& y, float& z, float& w) +{ + RpClump* clump = GetRpClump(); + if (!clump) + return false; + + // updating the bone frame orientation will also update its children + // This rotation is only applied when UpdateElementRpHAnim is called + auto* clumpDataInterface = *pGame->GetClumpData(clump); + auto* frameData = clumpDataInterface->GetFrameDataByNodeId(boneId); + if (!frameData) + return false; + + RtQuat* boneOrientation = &frameData->m_pIFrame->orientation; + x = boneOrientation->imag.x; + y = boneOrientation->imag.y; + z = boneOrientation->imag.z; + w = boneOrientation->real; + return true; +} + bool CEntitySA::SetBoneRotation(eBone boneId, float yaw, float pitch, float roll) { RpClump* clump = GetRpClump(); - if (clump) - { - // updating the bone frame orientation will also update its children - // This rotation is only applied when UpdateElementRpHAnim is called - CAnimBlendClumpDataSAInterface* clumpDataInterface = *pGame->GetClumpData(clump); - AnimBlendFrameData* frameData = clumpDataInterface->GetFrameDataByNodeId(boneId); - if (frameData) - { - RtQuat* boneOrientation = &frameData->m_pIFrame->orientation; - RwV3d angles = {yaw, roll, pitch}; - BoneNode_cSAInterface::EulerToQuat(&angles, boneOrientation); - CEntitySAInterface* theInterface = GetInterface(); - if (theInterface) - { - theInterface->bDontUpdateHierarchy = false; - } - return true; - } - } - return false; + if (!clump) + return false; + + // updating the bone frame orientation will also update its children + // This rotation is only applied when UpdateElementRpHAnim is called + auto* clumpDataInterface = *pGame->GetClumpData(clump); + auto* frameData = clumpDataInterface->GetFrameDataByNodeId(boneId); + if (!frameData) + return false; + + RtQuat* boneOrientation = &frameData->m_pIFrame->orientation; + RwV3d angles = { yaw, roll, pitch }; + BoneNode_cSAInterface::EulerToQuat(&angles, boneOrientation); + CEntitySAInterface* theInterface = GetInterface(); + if (theInterface) + theInterface->bDontUpdateHierarchy = false; + + return true; +} + +bool CEntitySA::SetBoneRotationQuat(eBone boneId, float x, float y, float z, float w) +{ + RpClump* clump = GetRpClump(); + if (!clump) + return false; + + // updating the bone frame orientation will also update its children + // This rotation is only applied when UpdateElementRpHAnim is called + auto* clumpDataInterface = *pGame->GetClumpData(clump); + auto* frameData = clumpDataInterface->GetFrameDataByNodeId(boneId); + if (!frameData) + return false; + + RtQuat* boneOrientation = &frameData->m_pIFrame->orientation; + boneOrientation->imag.x = x; + boneOrientation->imag.y = y; + boneOrientation->imag.z = z; + boneOrientation->real = w; + CEntitySAInterface* theInterface = GetInterface(); + if (theInterface) + theInterface->bDontUpdateHierarchy = false; + + return true; } bool CEntitySA::GetBonePosition(eBone boneId, CVector& position) { RwMatrix* rwBoneMatrix = GetBoneRwMatrix(boneId); - if (rwBoneMatrix) - { - const RwV3d& pos = rwBoneMatrix->pos; - position = {pos.x, pos.y, pos.z}; - return true; - } - return false; + if (!rwBoneMatrix) + return false; + + const RwV3d& pos = rwBoneMatrix->pos; + position = {pos.x, pos.y, pos.z}; + return true; } // NOTE: The position will be reset if UpdateElementRpHAnim is called after this. bool CEntitySA::SetBonePosition(eBone boneId, const CVector& position) { RwMatrix* rwBoneMatrix = GetBoneRwMatrix(boneId); - if (rwBoneMatrix) - { - CMatrixSAInterface boneMatrix(rwBoneMatrix, false); - boneMatrix.SetTranslateOnly(position); - boneMatrix.UpdateRW(); - return true; - } - return false; + if (!rwBoneMatrix) + return false; + + CMatrixSAInterface boneMatrix(rwBoneMatrix, false); + boneMatrix.SetTranslateOnly(position); + boneMatrix.UpdateRW(); + return true; } BYTE CEntitySA::GetAreaCode() diff --git a/Client/game_sa/CEntitySA.h b/Client/game_sa/CEntitySA.h index 9de57edc0a..205d5415f7 100644 --- a/Client/game_sa/CEntitySA.h +++ b/Client/game_sa/CEntitySA.h @@ -123,7 +123,7 @@ class CPlaceableSAInterface // 20 bytes class CEntitySAInterface { public: - CEntitySAInterfaceVTBL* vtbl; // the virtual table + CEntitySAInterfaceVTBL* vtbl; // the virtual table it should be in the CPlaceableSAInterface CPlaceableSAInterface Placeable; // 4 @@ -242,6 +242,10 @@ class CEntitySAInterface using vtbl_DeleteRwObject = void(__thiscall*)(CEntitySAInterface * pEntity); ((vtbl_DeleteRwObject)this->vtbl->DeleteRwObject)(this); }; + + bool HasMatrix() const noexcept { return Placeable.matrix != nullptr; } + + void RemoveMatrix() { ((void(__thiscall*)(void*))0x54F3B0)(this); } }; static_assert(sizeof(CEntitySAInterface) == 0x38, "Invalid size for CEntitySAInterface"); @@ -324,7 +328,9 @@ class CEntitySA : public virtual CEntity bool SetBoneMatrix(eBone boneId, const CMatrix& matrix); bool GetBoneRotation(eBone boneId, float& yaw, float& pitch, float& roll); + bool GetBoneRotationQuat(eBone boneId, float& x, float& y, float& z, float& w); bool SetBoneRotation(eBone boneId, float yaw, float pitch, float roll); + bool SetBoneRotationQuat(eBone boneId, float x, float y, float z, float w); bool GetBonePosition(eBone boneId, CVector& position); bool SetBonePosition(eBone boneId, const CVector& position); diff --git a/Client/game_sa/CGameSA.cpp b/Client/game_sa/CGameSA.cpp index 482a283ac0..837c84415d 100644 --- a/Client/game_sa/CGameSA.cpp +++ b/Client/game_sa/CGameSA.cpp @@ -145,6 +145,8 @@ CGameSA::CGameSA() m_pPlantManager = new CPlantManagerSA(); m_pBuildingRemoval = new CBuildingRemovalSA(); + m_pRenderer = std::make_unique(); + // Normal weapon types (WEAPONSKILL_STD) for (int i = 0; i < NUM_WeaponInfosStdSkill; i++) { diff --git a/Client/game_sa/CGameSA.h b/Client/game_sa/CGameSA.h index f958cb0e79..8124f99843 100644 --- a/Client/game_sa/CGameSA.h +++ b/Client/game_sa/CGameSA.h @@ -17,6 +17,7 @@ #include "CStreamingSA.h" #include "CCoverManagerSA.h" #include "CPlantManagerSA.h" +#include "CRendererSA.h" class CAnimBlendClumpDataSAInterface; class CObjectGroupPhysicalPropertiesSA; @@ -172,7 +173,8 @@ class CGameSA : public CGame CCoverManagerSA* GetCoverManager() const noexcept { return m_pCoverManager; }; CPlantManagerSA* GetPlantManager() const noexcept { return m_pPlantManager; }; CBuildingRemoval* GetBuildingRemoval() { return m_pBuildingRemoval; } - + CRenderer* GetRenderer() const noexcept override { return m_pRenderer.get(); } + CWeaponInfo* GetWeaponInfo(eWeaponType weapon, eWeaponSkill skill = WEAPONSKILL_STD); CModelInfo* GetModelInfo(DWORD dwModelID, bool bCanBeInvalid = false); CObjectGroupPhysicalProperties* GetObjectGroupPhysicalProperties(unsigned char ucObjectGroup); @@ -348,6 +350,8 @@ class CGameSA : public CGame CPlantManagerSA* m_pPlantManager; CBuildingRemoval* m_pBuildingRemoval; + std::unique_ptr m_pRenderer; + CPad* m_pPad; CAERadioTrackManager* m_pCAERadioTrackManager; CAudioEngine* m_pAudioEngine; diff --git a/Client/game_sa/CHeliSA.h b/Client/game_sa/CHeliSA.h index 49fc0d866d..497fe46a70 100644 --- a/Client/game_sa/CHeliSA.h +++ b/Client/game_sa/CHeliSA.h @@ -15,10 +15,47 @@ class CHeliSAInterface : public CAutomobileSAInterface { +public: + std::uint8_t m_heliFlags; + + std::uint8_t _pad1[3]; + std::uint32_t m_leftRightSkid; + std::uint32_t m_steeringUpDown; + std::uint32_t m_steeringLeftRight; + std::uint32_t m_accelerationBreakStatus; + std::uint32_t field_99C; + std::uint32_t m_rotorZ; + std::uint32_t m_secondRotorZ; + std::uint32_t m_maxAltitude; + std::uint32_t field_9AC; + std::uint32_t m_minAltitude; + std::uint32_t field_9B4; + std::uint8_t field_9B8; + std::uint8_t m_numSwatOccupants; + std::uint8_t m_swatIDs[4]; + + std::uint8_t _pad2[2]; + std::uint32_t field_9C0[4]; + std::uint32_t field_9D0; + + std::uint32_t m_particlesList; + std::uint8_t field_9D8[24]; + std::uint32_t field_9F0; + CVector m_searchLightTarget; + std::uint32_t m_searchLightIntensity; + std::uint32_t field_A04; + std::uint32_t field_A08; + std::uint32_t m_gunflashFx; + std::uint8_t m_firingMultiplier; + std::uint8_t m_searchLightEnabled; + std::uint8_t _pad3[2]; + std::uint32_t field_A14; }; +static_assert(sizeof(CHeliSAInterface) == 0xA18, "Invalid size for CHeliSAInterface"); class CHeliSA final : public virtual CHeli, public virtual CAutomobileSA { public: CHeliSA(CHeliSAInterface* pInterface); + CHeliSAInterface* GetHeliInterface() noexcept { return reinterpret_cast(GetInterface()); } }; diff --git a/Client/game_sa/CHudSA.cpp b/Client/game_sa/CHudSA.cpp index 170855388a..6b9c2ff770 100644 --- a/Client/game_sa/CHudSA.cpp +++ b/Client/game_sa/CHudSA.cpp @@ -11,6 +11,12 @@ #include "StdInc.h" #include "CHudSA.h" +#include "CGameSA.h" +#include "CCameraSA.h" +#include "CPlayerInfoSA.h" +#include "TaskAttackSA.h" + +extern CGameSA* pGame; char szVehicleName[50] = {'\0'}; char szZoneName[50] = {'\0'}; @@ -171,3 +177,54 @@ void CHudSA::ResetComponentAdjustment() MemPut(m_pfCameraCrosshairScale, 192.0f); m_fSniperCrosshairScale = 210.0f; } + +bool CHudSA::IsCrosshairVisible() +{ + bool specialAiming = false; + bool simpleAiming = false; + + // Get camera view mode + CCamera* camera = pGame->GetCamera(); + eCamMode cameraViewMode = static_cast(camera->GetCam(camera->GetActiveCam())->GetMode()); + + // Get player + CPed* playerPed = pGame->GetPedContext(); + CWeapon* weapon = nullptr; + eWeaponType weaponType; + + // Get player current weapon + if (playerPed) + { + weapon = playerPed->GetWeapon(playerPed->GetCurrentWeaponSlot()); + if (weapon) + weaponType = weapon->GetType(); + } + + // Special aiming + if (cameraViewMode == MODE_SNIPER || cameraViewMode == MODE_1STPERSON || cameraViewMode == MODE_ROCKETLAUNCHER || cameraViewMode == MODE_ROCKETLAUNCHER_HS || cameraViewMode == MODE_M16_1STPERSON || cameraViewMode == MODE_HELICANNON_1STPERSON || cameraViewMode == MODE_CAMERA) + { + if (weapon && cameraViewMode != MODE_1STPERSON && pGame->GetWeaponInfo(weaponType, WEAPONSKILL_STD)->GetFireType() != FIRETYPE_MELEE) + specialAiming = true; + } + + // Simple aiming + if (cameraViewMode == MODE_M16_1STPERSON_RUNABOUT || cameraViewMode == MODE_ROCKETLAUNCHER_RUNABOUT || cameraViewMode == MODE_ROCKETLAUNCHER_RUNABOUT_HS || cameraViewMode == MODE_SNIPER_RUNABOUT) + simpleAiming = true; + + if ((playerPed && weapon) && !playerPed->GetTargetedObject() && playerPed->GetPedInterface()->pPlayerData->m_bFreeAiming) + { + CTaskSimpleUseGun* taskUseGun = playerPed->GetPedIntelligence()->GetTaskUseGun(); + if ((!taskUseGun || !taskUseGun->GetSkipAim()) && (cameraViewMode == MODE_AIMWEAPON || cameraViewMode == MODE_AIMWEAPON_FROMCAR || cameraViewMode == MODE_AIMWEAPON_ATTACHED)) + { + if (playerPed->GetPedState() != PED_ENTER_CAR && playerPed->GetPedState() != PED_CARJACK) + { + if ((weaponType >= WEAPONTYPE_PISTOL && weaponType <= WEAPONTYPE_M4) || weaponType == WEAPONTYPE_TEC9 || weaponType == WEAPONTYPE_COUNTRYRIFLE || weaponType == WEAPONTYPE_MINIGUN || weaponType == WEAPONTYPE_FLAMETHROWER) + simpleAiming = cameraViewMode != MODE_AIMWEAPON || camera->GetTransitionState() == 0; + } + } + } + + // Check CTheScripts::bDrawCrossHair + std::uint8_t crossHairType = *reinterpret_cast(VAR_CTheScripts_bDrawCrossHair); + return specialAiming || simpleAiming || crossHairType > 0; +} diff --git a/Client/game_sa/CHudSA.h b/Client/game_sa/CHudSA.h index 925cc1dff4..11f1747b51 100644 --- a/Client/game_sa/CHudSA.h +++ b/Client/game_sa/CHudSA.h @@ -38,6 +38,8 @@ #define CODE_ShowMoney 0x58F47D +#define VAR_CTheScripts_bDrawCrossHair 0xA44490 + struct SHudComponent { bool bIsPartOfAll; @@ -59,6 +61,7 @@ class CHudSA : public CHud bool IsComponentVisible(eHudComponent component); void AdjustComponents(float fAspectRatio); void ResetComponentAdjustment(); + bool IsCrosshairVisible(); protected: void InitComponentList(); diff --git a/Client/game_sa/CModelInfoSA.cpp b/Client/game_sa/CModelInfoSA.cpp index 72b2c92b74..c8f37cf9a8 100644 --- a/Client/game_sa/CModelInfoSA.cpp +++ b/Client/game_sa/CModelInfoSA.cpp @@ -2025,7 +2025,10 @@ void CModelInfoSA::RestoreAllObjectsPropertiesGroups() eModelInfoType CModelInfoSA::GetModelType() { - return ((eModelInfoType(*)())m_pInterface->VFTBL->GetModelType)(); + if (auto pInterface = GetInterface()) + return ((eModelInfoType(*)())pInterface->VFTBL->GetModelType)(); + + return eModelInfoType::UNKNOWN; } bool CModelInfoSA::IsTowableBy(CModelInfo* towingModel) diff --git a/Client/game_sa/CPedIntelligenceSA.cpp b/Client/game_sa/CPedIntelligenceSA.cpp index 3c5b1359d0..e6752a96da 100644 --- a/Client/game_sa/CPedIntelligenceSA.cpp +++ b/Client/game_sa/CPedIntelligenceSA.cpp @@ -14,6 +14,7 @@ #include "CPedSA.h" #include "CTaskManagementSystemSA.h" #include "CTaskManagerSA.h" +#include "TaskAttackSA.h" CPedIntelligenceSA::CPedIntelligenceSA(CPedIntelligenceSAInterface* pedIntelligenceSAInterface, CPed* ped) { @@ -55,3 +56,16 @@ CTaskSAInterface* CPedIntelligenceSA::SetTaskDuckSecondary(unsigned short nLengt auto SetTaskDuckSecondary = (CTaskSAInterface * (__thiscall*)(CPedIntelligenceSAInterface*, unsigned short))0x601230; return SetTaskDuckSecondary(internalInterface, nLengthOfDuck); } + +CTaskSimpleUseGun* CPedIntelligenceSA::GetTaskUseGun() +{ + CTaskManager* taskMgr = GetTaskManager(); + if (!taskMgr) + return nullptr; + + CTask* secondaryTask = taskMgr->GetTaskSecondary(TASK_SECONDARY_ATTACK); + if (secondaryTask && secondaryTask->GetTaskType() == TASK_SIMPLE_USE_GUN) + return dynamic_cast(secondaryTask); + + return nullptr; +} diff --git a/Client/game_sa/CPedIntelligenceSA.h b/Client/game_sa/CPedIntelligenceSA.h index 7e813193c0..10cfe322ce 100644 --- a/Client/game_sa/CPedIntelligenceSA.h +++ b/Client/game_sa/CPedIntelligenceSA.h @@ -54,4 +54,5 @@ class CPedIntelligenceSA : public CPedIntelligence CTaskManager* GetTaskManager(); bool TestForStealthKill(CPed* pPed, bool bUnk); CTaskSAInterface* SetTaskDuckSecondary(unsigned short nLengthOfDuck); + CTaskSimpleUseGun* GetTaskUseGun(); }; diff --git a/Client/game_sa/CPedSA.h b/Client/game_sa/CPedSA.h index fee84fd651..ab16ea28f8 100644 --- a/Client/game_sa/CPedSA.h +++ b/Client/game_sa/CPedSA.h @@ -230,7 +230,12 @@ class CPedSAInterface : public CPhysicalSAInterface // +1420 = curre int iMoveAnimGroup; // 1236 BYTE bPad4b[52]; CPedIKSAInterface pedIK; // 1292 (length 32 bytes) - int bPad5[5]; + + std::uint32_t field_52C; + ePedState pedState; + eMoveState moveState; + eMoveState swimmingMoveState; + std::uint32_t field_53C; float fHealth; int iUnknown121; @@ -258,7 +263,9 @@ class CPedSAInterface : public CPhysicalSAInterface // +1420 = curre // weapons at +1440 ends at +1804 BYTE bPad4[12]; BYTE bCurrentWeaponSlot; // is actually here - BYTE bPad6[20]; + BYTE bPad6[3]; + CEntitySAInterface* pTargetedObject; + BYTE tempPad[13]; BYTE bFightingStyle; // 1837 BYTE bFightingStyleExtra; BYTE bPad7[1]; @@ -408,5 +415,8 @@ class CPedSA : public virtual CPed, public virtual CPhysicalSA std::unique_ptr GetPedIK() { return std::make_unique(GetPedIKInterface()); } static void StaticSetHooks(); + CEntitySAInterface* GetTargetedObject() { return GetPedInterface()->pTargetedObject; } + ePedState GetPedState() { return GetPedInterface()->pedState; } + void GetAttachedSatchels(std::vector &satchelsList) const override; }; diff --git a/Client/game_sa/CPlayerInfoSA.h b/Client/game_sa/CPlayerInfoSA.h index a8b3a84f44..fd73385f05 100644 --- a/Client/game_sa/CPlayerInfoSA.h +++ b/Client/game_sa/CPlayerInfoSA.h @@ -41,8 +41,9 @@ class CPlayerPedDataSAInterface CVector2D m_vecFightMovement; // 12 float m_moveBlendRatio; // 20 - float m_fSprintEnergy; // 24 - // FLOAT m_fSprintControlCounter; // Removed arbitatrily to aligned next byte, should be here really + float m_fTimeCanRun; + float m_fSprintEnergy; + BYTE m_nChosenWeapon; // 28 BYTE m_nCarDangerCounter; // 29 BYTE m_pad0; // 30 @@ -68,8 +69,6 @@ class CPlayerPedDataSAInterface DWORD m_bInVehicleDontAllowWeaponChange : 1; // stop weapon change once driveby weapon has been given DWORD m_bRenderWeapon : 1; // set to false during cutscenes so that knuckledusters are not rendered - DWORD m_pad2; // 56 - long m_PlayerGroup; // 60 DWORD m_AdrenalineEndTime; // 64 diff --git a/Client/game_sa/CPlayerPedSA.cpp b/Client/game_sa/CPlayerPedSA.cpp index ad555041d0..534f8376c6 100644 --- a/Client/game_sa/CPlayerPedSA.cpp +++ b/Client/game_sa/CPlayerPedSA.cpp @@ -75,7 +75,7 @@ CPlayerPedSA::CPlayerPedSA(unsigned int nModelIndex) // Set default stuff m_pData->m_bRenderWeapon = true; m_pData->m_Wanted = pLocalWanted; - m_pData->m_fSprintEnergy = 1000.0f; + m_pData->m_fTimeCanRun = 1000.0f; // Clothes pointers or we'll crash later (TODO: Wrap up with some cloth classes and make it unique per player) m_pData->m_pClothes = pLocalClothes; diff --git a/Client/game_sa/CRendererSA.cpp b/Client/game_sa/CRendererSA.cpp new file mode 100644 index 0000000000..bad607d5ba --- /dev/null +++ b/Client/game_sa/CRendererSA.cpp @@ -0,0 +1,55 @@ +/***************************************************************************** + * + * PROJECT: Multi Theft Auto v1.0 + * LICENSE: See LICENSE in the top level directory + * FILE: game_sa/CRendererSA.cpp + * PURPOSE: Game renderer class + * + * Multi Theft Auto is available from http://www.multitheftauto.com/ + * + *****************************************************************************/ + +#include "StdInc.h" +#include "CRendererSA.h" +#include "CModelInfoSA.h" +#include "CMatrix.h" +#include "gamesa_renderware.h" + +CRendererSA::CRendererSA() +{ +} + +CRendererSA::~CRendererSA() +{ +} + +void CRendererSA::RenderModel(CModelInfo* pModelInfo, const CMatrix& matrix) +{ + CBaseModelInfoSAInterface* pModelInfoSAInterface = pModelInfo->GetInterface(); + if (!pModelInfoSAInterface) + return; + + RwObject* pRwObject = pModelInfoSAInterface->pRwObject; + if (!pRwObject) + return; + + RwFrame* pFrame = RpGetFrame(pRwObject); + + static RwMatrix rwMatrix; + rwMatrix.right = (RwV3d&)matrix.vRight; + rwMatrix.up = (RwV3d&)matrix.vFront; + rwMatrix.at = (RwV3d&)matrix.vUp; + rwMatrix.pos = (RwV3d&)matrix.vPos; + RwFrameTransform(pFrame, &rwMatrix, rwCOMBINEREPLACE); + + if (pRwObject->type == RP_TYPE_ATOMIC) + { + RpAtomic* pRpAtomic = reinterpret_cast(pRwObject); + pRpAtomic->renderCallback(reinterpret_cast(pRwObject)); + } + else + { + RpClump* pClump = reinterpret_cast(pRwObject); + RpClumpRender(pClump); + } +} diff --git a/Client/game_sa/CRendererSA.h b/Client/game_sa/CRendererSA.h new file mode 100644 index 0000000000..e71a83665e --- /dev/null +++ b/Client/game_sa/CRendererSA.h @@ -0,0 +1,23 @@ +/***************************************************************************** + * + * PROJECT: Multi Theft Auto v1.0 + * LICENSE: See LICENSE in the top level directory + * FILE: game_sa/CRendererSA.h + * PURPOSE: Game renderer class + * + * Multi Theft Auto is available from http://www.multitheftauto.com/ + * + *****************************************************************************/ + +#pragma once + +#include + +class CRendererSA : public CRenderer +{ +public: + CRendererSA(); + ~CRendererSA(); + + void RenderModel(CModelInfo* pModelInfo, const CMatrix& matrix) override; +}; diff --git a/Client/game_sa/CSettingsSA.cpp b/Client/game_sa/CSettingsSA.cpp index b1b8f0ed86..4ce70b5eed 100644 --- a/Client/game_sa/CSettingsSA.cpp +++ b/Client/game_sa/CSettingsSA.cpp @@ -273,7 +273,7 @@ void CSettingsSA::Save() } } -bool CSettingsSA::IsVolumetricShadowsEnabled() +bool CSettingsSA::IsVolumetricShadowsEnabled() const noexcept { return m_bVolumetricShadowsEnabled && !m_bVolumetricShadowsSuspended; } @@ -287,6 +287,20 @@ void CSettingsSA::SetVolumetricShadowsEnabled(bool bEnable) MemPut(0x5E682A + 1, bEnable); } + +bool CSettingsSA::GetVolumetricShadowsEnabledByVideoSetting() const noexcept +{ + bool volumetricShadow; + g_pCore->GetCVars()->Get("volumetric_shadows", volumetricShadow); + return volumetricShadow; +} + +bool CSettingsSA::ResetVolumetricShadows() noexcept +{ + pGame->GetSettings()->SetVolumetricShadowsEnabled(pGame->GetSettings()->GetVolumetricShadowsEnabledByVideoSetting()); + return true; +} + void CSettingsSA::SetVolumetricShadowsSuspended(bool bSuspended) { m_bVolumetricShadowsSuspended = bSuspended; diff --git a/Client/game_sa/CSettingsSA.h b/Client/game_sa/CSettingsSA.h index 9bb313e566..7947c94929 100644 --- a/Client/game_sa/CSettingsSA.h +++ b/Client/game_sa/CSettingsSA.h @@ -138,7 +138,10 @@ class CSettingsSA : public CGameSettings bool IsMipMappingEnabled(); void SetMipMappingEnabled(bool bEnable); - bool IsVolumetricShadowsEnabled(); + bool IsVolumetricShadowsEnabled() const noexcept; + bool GetVolumetricShadowsEnabledByVideoSetting() const noexcept; + bool ResetVolumetricShadows() noexcept; + void SetVolumetricShadowsEnabled(bool bEnable); void SetVolumetricShadowsSuspended(bool bSuspended); diff --git a/Client/game_sa/CTrainSA.h b/Client/game_sa/CTrainSA.h index 969fa907ee..84b25a6108 100644 --- a/Client/game_sa/CTrainSA.h +++ b/Client/game_sa/CTrainSA.h @@ -14,29 +14,27 @@ #include "CVehicleSA.h" #include "CDoorSA.h" -namespace eTrainNode +enum class eTrainNodes { - enum - { - NONE = 0, - DOOR_LF = 1, - DOOR_RF = 2, - WHEEL_RF1 = 3, - WHEEL_RF2 = 4, - WHEEL_RF3 = 5, - WHEEL_RB1 = 6, - WHEEL_RB2 = 7, - WHEEL_RB3 = 8, - WHEEL_LF1 = 9, - WHEEL_LF2 = 10, - WHEEL_LF3 = 11, - WHEEL_LB1 = 12, - WHEEL_LB2 = 13, - WHEEL_LB3 = 14, - BOGIE_FRONT = 15, - BOGIE_REAR = 16, - NUM_NODES - }; + NONE = 0, + DOOR_LF, + DOOR_RF, + WHEEL_RF1, + WHEEL_RF2, + WHEEL_RF3, + WHEEL_RB1, + WHEEL_RB2, + WHEEL_RB3, + WHEEL_LF1, + WHEEL_LF2, + WHEEL_LF3, + WHEEL_LB1, + WHEEL_LB2, + WHEEL_LB3, + BOGIE_FRONT, + BOGIE_REAR, + + NUM_NODES }; enum class eTrainPassengersGenerationState : unsigned char @@ -101,7 +99,7 @@ class CTrainSAInterface : public CVehicleSAInterface CTrainSAInterface* m_prevCarriage; CTrainSAInterface* m_nextCarriage; CDoorSAInterface m_aDoors[MAX_DOORS]; - RwFrame* m_aTrainNodes[eTrainNode::NUM_NODES]; + RwFrame* m_aTrainNodes[static_cast(eTrainNodes::NUM_NODES)]; }; static_assert(sizeof(CTrainSAInterface) == 0x6AC, "Invalid size for CTrainSAInterface"); diff --git a/Client/game_sa/CVehicleSA.cpp b/Client/game_sa/CVehicleSA.cpp index 91fb5440e0..b4e7a2c438 100644 --- a/Client/game_sa/CVehicleSA.cpp +++ b/Client/game_sa/CVehicleSA.cpp @@ -21,6 +21,7 @@ #include "CTrainSA.h" #include "CPlaneSA.h" #include "CVehicleSA.h" +#include "CBoatSA.h" #include "CVisibilityPluginsSA.h" #include "CWorldSA.h" #include "gamesa_renderware.h" @@ -684,6 +685,17 @@ void CVehicleSA::RemoveVehicleUpgrade(DWORD dwModelID) push dwModelID call dwFunc } + + // GTA SA only does this when CVehicle::ClearVehicleUpgradeFlags returns false. + // In the case of hydraulics and nitro, this function does not return false and the upgrade is never removed from the array + for (std::int16_t& upgrade : GetVehicleInterface()->m_upgrades) + { + if (upgrade == dwModelID) + { + upgrade = -1; + break; + } + } } bool CVehicleSA::DoesSupportUpgrade(const SString& strFrameName) @@ -1322,49 +1334,41 @@ void CVehicleSA::RecalculateHandling() // Put it in our interface CVehicleSAInterface* pInt = GetVehicleInterface(); unsigned int uiHandlingFlags = m_pHandlingData->GetInterface()->uiHandlingFlags; - // user error correction - NOS_INST = NOS Installed t/f - // if nos is installed we need the flag set - if (pInt->m_upgrades[0] && pInt->m_upgrades[0] >= 1008 && pInt->m_upgrades[0] <= 1010) + bool hydralicsInstalled = false, nitroInstalled = false; + + // We check whether the user has not set incorrect flags via handlingFlags in the case of nitro and hydraulics + // If this happened, we need to correct it + for (const std::int16_t& upgradeID : pInt->m_upgrades) { - // Flag not enabled? - if (uiHandlingFlags | HANDLING_NOS_Flag) + // Empty upgrades value is -1 + if (upgradeID < 0) + continue; + + // If NOS is installed we need set the flag + if ((upgradeID >= 1008 && upgradeID <= 1010) && !(uiHandlingFlags & HANDLING_NOS_Flag)) { - // Set zee flag uiHandlingFlags |= HANDLING_NOS_Flag; - m_pHandlingData->SetHandlingFlags(uiHandlingFlags); + nitroInstalled = true; } - } - else - { - // Flag Enabled? - if (uiHandlingFlags & HANDLING_NOS_Flag) - { - // Unset the flag - uiHandlingFlags &= ~HANDLING_NOS_Flag; - m_pHandlingData->SetHandlingFlags(uiHandlingFlags); - } - } - // Hydraulics Flag fixing - if (pInt->m_upgrades[1] && pInt->m_upgrades[1] == 1087) - { - // Flag not enabled? - if (uiHandlingFlags | HANDLING_Hydraulics_Flag) + + // If hydraulics is installed we need set the flag + if ((upgradeID == 1087) && !(uiHandlingFlags & HANDLING_Hydraulics_Flag)) { - // Set zee flag uiHandlingFlags |= HANDLING_Hydraulics_Flag; - m_pHandlingData->SetHandlingFlags(uiHandlingFlags); - } - } - else - { - // Flag Enabled? - if (uiHandlingFlags & HANDLING_Hydraulics_Flag) - { - // Unset the flag - uiHandlingFlags &= ~HANDLING_Hydraulics_Flag; - m_pHandlingData->SetHandlingFlags(uiHandlingFlags); + hydralicsInstalled = true; } } + + // If hydraulics isn't installed we need unset the flag + if ((!hydralicsInstalled) && (uiHandlingFlags & HANDLING_Hydraulics_Flag)) + uiHandlingFlags &= ~HANDLING_Hydraulics_Flag; + + // If NOS isn't installed we need unset the flag + if ((!nitroInstalled) && (uiHandlingFlags & HANDLING_NOS_Flag)) + uiHandlingFlags &= ~HANDLING_NOS_Flag; + + m_pHandlingData->SetHandlingFlags(uiHandlingFlags); + pInt->dwHandlingFlags = uiHandlingFlags; pInt->m_fMass = m_pHandlingData->GetInterface()->fMass; pInt->m_fTurnMass = m_pHandlingData->GetInterface()->fTurnMass; // * pGame->GetHandlingManager()->GetTurnMassMultiplier(); @@ -1501,27 +1505,98 @@ void CVehicleSA::SetGravity(const CVector* pvecGravity) m_vecGravity = *pvecGravity; } -CObject* CVehicleSA::SpawnFlyingComponent(int i_1, unsigned int ui_2) +bool CVehicleSA::SpawnFlyingComponent(const eCarNodes& nodeIndex, const eCarComponentCollisionTypes& collisionType, std::int32_t removalTime) { - DWORD dwReturn; - DWORD dwThis = (DWORD)GetInterface(); - DWORD dwFunc = FUNC_CAutomobile__SpawnFlyingComponent; - _asm + if (nodeIndex == eCarNodes::NONE) + return false; + + DWORD nodesOffset = OFFSET_CAutomobile_Nodes; + RwFrame* defaultBikeChassisFrame = nullptr; + + // CBike, CBmx, CBoat and CTrain don't inherit CAutomobile so let's do it manually! + switch (static_cast(GetVehicleInterface()->m_vehicleClass)) { - mov ecx, dwThis - push ui_2 - push i_1 - call dwFunc - mov dwReturn, eax + case VehicleClass::AUTOMOBILE: + case VehicleClass::MONSTER_TRUCK: + case VehicleClass::PLANE: + case VehicleClass::HELI: + case VehicleClass::TRAILER: + case VehicleClass::QUAD: + { + nodesOffset = OFFSET_CAutomobile_Nodes; + break; + } + case VehicleClass::TRAIN: + { + if (static_cast(nodeIndex) >= eTrainNodes::NUM_NODES) + return false; + + nodesOffset = OFFSET_CTrain_Nodes; + break; + } + case VehicleClass::BIKE: + case VehicleClass::BMX: + { + auto* bikeInterface = static_cast(GetVehicleInterface()); + if (!bikeInterface) + return false; + + if (static_cast(nodeIndex) >= eBikeNodes::NUM_NODES) + return false; + + nodesOffset = OFFSET_CBike_Nodes; + if (static_cast(nodeIndex) != eBikeNodes::CHASSIS) + break; + + // Set the correct "bike_chassis" frame for bikes + defaultBikeChassisFrame = bikeInterface->m_apModelNodes[1]; + if (defaultBikeChassisFrame && std::strcmp(defaultBikeChassisFrame->szName, "chassis_dummy") == 0) + { + RwFrame* correctChassisFrame = RwFrameFindFrame(RpGetFrame(bikeInterface->m_pRwObject), "chassis"); + if (correctChassisFrame) + bikeInterface->m_apModelNodes[1] = correctChassisFrame; + } + break; + } + case VehicleClass::BOAT: + { + if (static_cast(nodeIndex) >= eBoatNodes::NUM_NODES) + return false; + + nodesOffset = OFFSET_CBoat_Nodes; + break; + } + default: + return false; } - CObject* pObject = NULL; - if (dwReturn) + // Patch nodes array in CAutomobile::SpawnFlyingComponent + MemPut(0x6A85B3, nodesOffset); + MemPut(0x6A8631, nodesOffset); + + auto* componentObject = ((CObjectSAInterface * (__thiscall*)(CVehicleSAInterface*, int, int)) FUNC_CAutomobile__SpawnFlyingComponent)(GetVehicleInterface(), static_cast(nodeIndex), static_cast(collisionType)); + + // Restore default nodes array in CAutomobile::SpawnFlyingComponent + // CAutomobile::m_aCarNodes offset + MemPut(0x6A85B3, 0x648); + MemPut(0x6A8631, 0x648); + + // Restore default chassis frame for bikes + if (static_cast(nodeIndex) == eBikeNodes::CHASSIS && defaultBikeChassisFrame) { - SClientEntity* pObjectClientEntity = pGame->GetPools()->GetObject((DWORD*)dwReturn); - pObject = pObjectClientEntity ? pObjectClientEntity->pEntity : nullptr; + auto* bikeInterface = static_cast(GetVehicleInterface()); + if (bikeInterface && bikeInterface->m_apModelNodes) + bikeInterface->m_apModelNodes[1] = defaultBikeChassisFrame; } - return pObject; + + if (removalTime <= -1 || !componentObject) + return true; + + // Set double-sided + componentObject->bBackfaceCulled = true; + + componentObject->uiObjectRemovalTime = pGame->GetSystemTime() + static_cast(removalTime); + return true; } void CVehicleSA::SetWheelVisibility(eWheelPosition wheel, bool bVisible) @@ -1531,16 +1606,16 @@ void CVehicleSA::SetWheelVisibility(eWheelPosition wheel, bool bVisible) switch (wheel) { case FRONT_LEFT_WHEEL: - pFrame = vehicle->m_aCarNodes[eCarNode::WHEEL_LF]; + pFrame = vehicle->m_aCarNodes[static_cast(eCarNodes::WHEEL_LF)]; break; case REAR_LEFT_WHEEL: - pFrame = vehicle->m_aCarNodes[eCarNode::WHEEL_LB]; + pFrame = vehicle->m_aCarNodes[static_cast(eCarNodes::WHEEL_LB)]; break; case FRONT_RIGHT_WHEEL: - pFrame = vehicle->m_aCarNodes[eCarNode::WHEEL_RF]; + pFrame = vehicle->m_aCarNodes[static_cast(eCarNodes::WHEEL_RF)]; break; case REAR_RIGHT_WHEEL: - pFrame = vehicle->m_aCarNodes[eCarNode::WHEEL_RB]; + pFrame = vehicle->m_aCarNodes[static_cast(eCarNodes::WHEEL_RB)]; break; default: break; diff --git a/Client/game_sa/CVehicleSA.h b/Client/game_sa/CVehicleSA.h index 58632dabbf..9674a165cd 100644 --- a/Client/game_sa/CVehicleSA.h +++ b/Client/game_sa/CVehicleSA.h @@ -94,6 +94,18 @@ struct RwTexture; #define FUNC_CAutomobile_OnVehiclePreRender 0x6ABCFD #define FUNC_CVehicle_DoSunGlare 0x6DD6F0 +// CClumpModelInfo::GetFrameFromName +#define FUNC_CClumpModelInfo_GetFrameFromName 0x4C5400 + +// CAutomobile::m_aCarNodes +// CTrain::m_aTrainNodes +// CBike::m_apModelNodes +// CBoat::pBoatParts +#define OFFSET_CAutomobile_Nodes 0x648 +#define OFFSET_CTrain_Nodes 0x668 +#define OFFSET_CBike_Nodes 0x5A0 +#define OFFSET_CBoat_Nodes 0x5B0 + struct SRailNodeSA { short sX; // x coordinate times 8 @@ -604,7 +616,7 @@ class CVehicleSA : public virtual CVehicle, public virtual CPhysicalSA SharedUtil::SColor GetHeadLightColor() { return m_HeadLightColor; } void SetHeadLightColor(const SharedUtil::SColor color) { m_HeadLightColor = color; } - CObject* SpawnFlyingComponent(int i_1, unsigned int ui_2); + bool SpawnFlyingComponent(const eCarNodes& nodeIndex, const eCarComponentCollisionTypes& collisionType, std::int32_t removalTime = -1); void SetWheelVisibility(eWheelPosition wheel, bool bVisible); CVector GetWheelPosition(eWheelPosition wheel); diff --git a/Client/game_sa/CVisibilityPluginsSA.cpp b/Client/game_sa/CVisibilityPluginsSA.cpp index d7cf9849bc..b5fe2d92c6 100644 --- a/Client/game_sa/CVisibilityPluginsSA.cpp +++ b/Client/game_sa/CVisibilityPluginsSA.cpp @@ -12,6 +12,8 @@ #include "StdInc.h" #include "CVisibilityPluginsSA.h" +#define FUNC_CVisibilityPlugins_InsertEntityIntoEntityList 0x733DD0 + void CVisibilityPluginsSA::SetClumpAlpha(RpClump* pClump, int iAlpha) { DWORD dwFunc = FUNC_CVisiblityPlugins_SetClumpAlpha; @@ -51,3 +53,8 @@ int CVisibilityPluginsSA::GetAtomicId(RwObject* pAtomic) } return iResult; } + +bool CVisibilityPluginsSA::InsertEntityIntoEntityList(void* entity, float distance, void* callback) +{ + return ((bool(_cdecl*)(void*, float, void*))FUNC_CVisibilityPlugins_InsertEntityIntoEntityList)(entity, distance, callback); +} diff --git a/Client/game_sa/CVisibilityPluginsSA.h b/Client/game_sa/CVisibilityPluginsSA.h index 57cab620c0..f4a583bcf2 100644 --- a/Client/game_sa/CVisibilityPluginsSA.h +++ b/Client/game_sa/CVisibilityPluginsSA.h @@ -21,4 +21,6 @@ class CVisibilityPluginsSA : public CVisibilityPlugins public: void SetClumpAlpha(RpClump* pClump, int iAlpha); int GetAtomicId(RwObject* pAtomic); + + bool InsertEntityIntoEntityList(void* entity, float distance, void* callback); }; diff --git a/Client/game_sa/TaskBasicSA.cpp b/Client/game_sa/TaskBasicSA.cpp index 9ef743a9b8..18ca6e38a4 100644 --- a/Client/game_sa/TaskBasicSA.cpp +++ b/Client/game_sa/TaskBasicSA.cpp @@ -13,6 +13,27 @@ #include "TaskBasicSA.h" #include "CPedSA.h" + +CTaskSimpleRunNamedAnimSAInterface* CTaskSimpleRunNamedAnimSA::GetAnimationInterface() noexcept +{ + return reinterpret_cast(this->GetInterface()); +} + +const CTaskSimpleRunNamedAnimSAInterface* CTaskSimpleRunNamedAnimSA::GetAnimationInterface() const noexcept +{ + return reinterpret_cast(this->GetInterface()); +} + +const char* CTaskSimpleRunNamedAnimSA::GetAnimName() const noexcept +{ + return GetAnimationInterface()->m_animName; +} + +const char* CTaskSimpleRunNamedAnimSA::GetGroupName() const noexcept +{ + return GetAnimationInterface()->m_animGroupName; +} + CTaskComplexUseMobilePhoneSA::CTaskComplexUseMobilePhoneSA(const int iDuration) { CreateTaskInterface(sizeof(CTaskComplexUseMobilePhoneSAInterface)); diff --git a/Client/game_sa/TaskBasicSA.h b/Client/game_sa/TaskBasicSA.h index 2f8f18dc70..914d5d7181 100644 --- a/Client/game_sa/TaskBasicSA.h +++ b/Client/game_sa/TaskBasicSA.h @@ -113,6 +113,12 @@ class CTaskSimpleRunNamedAnimSA : public virtual CTaskSimpleAnimSA, public virtu CTaskSimpleRunNamedAnimSA(const char* pAnimName, const char* pAnimGroupName, const int flags, const float fBlendDelta, const int iTime = -1, const bool bDontInterrupt = false, const bool bRunInSequence = false, const bool bOffsetPed = false, const bool bHoldLastFrame = false); + + CTaskSimpleRunNamedAnimSAInterface* GetAnimationInterface() noexcept; + const CTaskSimpleRunNamedAnimSAInterface* GetAnimationInterface() const noexcept; + + const char* GetAnimName() const noexcept override; + const char* GetGroupName() const noexcept override; }; class CTaskComplexDieSAInterface : public CTaskComplexSAInterface diff --git a/Client/game_sa/TaskSA.h b/Client/game_sa/TaskSA.h index 1022b070b0..c47116044b 100644 --- a/Client/game_sa/TaskSA.h +++ b/Client/game_sa/TaskSA.h @@ -85,7 +85,8 @@ class CTaskSA : public virtual CTask // our function(s) void SetInterface(CTaskSAInterface* pInterface) { TaskInterface = pInterface; }; - CTaskSAInterface* GetInterface() { return TaskInterface; } + CTaskSAInterface* GetInterface() noexcept { return TaskInterface; } + const CTaskSAInterface* GetInterface() const noexcept { return TaskInterface; } bool IsValid() { return GetInterface() != NULL; } void CreateTaskInterface(size_t nSize); diff --git a/Client/game_sa/gamesa_renderware.h b/Client/game_sa/gamesa_renderware.h index e2f2d9a472..594c203b59 100644 --- a/Client/game_sa/gamesa_renderware.h +++ b/Client/game_sa/gamesa_renderware.h @@ -38,6 +38,7 @@ typedef RwFrame*(__cdecl* RwFrameAddChild_t)(RwFrame* parent, RwFrame* child); typedef RwFrame*(__cdecl* RwFrameRemoveChild_t)(RwFrame* child); typedef RwFrame*(__cdecl* RwFrameForAllObjects_t)(RwFrame* frame, void* callback, void* data); typedef RwFrame*(__cdecl* RwFrameTranslate_t)(RwFrame* frame, const RwV3d* v, RwTransformOrder order); +typedef RwFrame*(__cdecl* RwFrameTransform_t)(RwFrame* frame, const RwMatrix* m, RwOpCombineType combine); typedef RwFrame*(__cdecl* RwFrameScale_t)(RwFrame* frame, const RwV3d* v, RwTransformOrder order); typedef RwFrame*(__cdecl* RwFrameUpdateObjects_t)(RwFrame*); typedef RwFrame*(__cdecl* RwFrameCreate_t)(); @@ -69,6 +70,7 @@ typedef RwTexture*(__cdecl* RwTexDictionaryAddTexture_t)(RwTexDictionary* dict, typedef RwTexDictionary*(__cdecl* RwTexDictionaryGetCurrent_t)(); typedef RwTexture*(__cdecl* RwTexDictionaryFindNamedTexture_t)(RwTexDictionary* dict, const char* name); typedef void(__cdecl* RpPrtStdGlobalDataSetStreamEmbedded_t)(void* value); +typedef RpClump*(__cdecl* RpClumpRender_t)(RpClump* clump); typedef RpWorld*(__cdecl* RpWorldAddAtomic_t)(RpWorld* world, RpAtomic* atomic); typedef RpWorld*(__cdecl* RpWorldAddClump_t)(RpWorld* world, RpClump* clump); typedef RpWorld*(__cdecl* RpWorldAddLight_t)(RpWorld* world, RpLight* light); @@ -125,6 +127,7 @@ RWFUNC(RwStreamSkip_t RwStreamSkip, (RwStreamSkip_t)0xDEAD) RWFUNC(RpClumpDestroy_t RpClumpDestroy, (RpClumpDestroy_t)0xDEAD) RWFUNC(RpClumpGetNumAtomics_t RpClumpGetNumAtomics, (RpClumpGetNumAtomics_t)0xDEAD) RWFUNC(RwFrameTranslate_t RwFrameTranslate, (RwFrameTranslate_t)0xDEAD) +RWFUNC(RwFrameTransform_t RwFrameTransform, (RwFrameTransform_t)0xDEAD) RWFUNC(RpClumpForAllAtomics_t RpClumpForAllAtomics, (RpClumpForAllAtomics_t)0xDEAD) RWFUNC(RwFrameAddChild_t RwFrameAddChild, (RwFrameAddChild_t)0xDEAD) RWFUNC(RpClumpAddAtomic_t RpClumpAddAtomic, (RpClumpAddAtomic_t)0xDEAD) @@ -138,6 +141,7 @@ RWFUNC(RwTexDictionaryAddTexture_t RwTexDictionaryAddTexture, (RwTexDictionaryAd RWFUNC(RwTexDictionaryStreamWrite_t RwTexDictionaryStreamWrite, (RwTexDictionaryStreamWrite_t)0xDEAD) RWFUNC(rwD3D9NativeTextureRead_t rwD3D9NativeTextureRead, (rwD3D9NativeTextureRead_t)0xDEAD) RWFUNC(RpPrtStdGlobalDataSetStreamEmbedded_t RpPrtStdGlobalDataSetStreamEmbedded, (RpPrtStdGlobalDataSetStreamEmbedded_t)0xDEAD) +RWFUNC(RpClumpRender_t RpClumpRender, (RpClumpRender_t)0xDEAD) RWFUNC(RpClumpRemoveAtomic_t RpClumpRemoveAtomic, (RpClumpRemoveAtomic_t)0xDEAD) RWFUNC(RpAtomicClone_t RpAtomicClone, (RpAtomicClone_t)0xDEAD) RWFUNC(RwTexDictionaryFindNamedTexture_t RwTexDictionaryFindNamedTexture, (RwTexDictionaryFindNamedTexture_t)0xDEAD) diff --git a/Client/game_sa/gamesa_renderware.hpp b/Client/game_sa/gamesa_renderware.hpp index 804040c802..a638cfede0 100644 --- a/Client/game_sa/gamesa_renderware.hpp +++ b/Client/game_sa/gamesa_renderware.hpp @@ -20,6 +20,7 @@ void InitRwFunctions() RwStreamSkip = (RwStreamSkip_t)0x007ECD00; RpClumpDestroy = (RpClumpDestroy_t)0x0074A310; RpClumpGetNumAtomics = (RpClumpGetNumAtomics_t)0x007498E0; + RwFrameTransform = (RwFrameTransform_t)0x007F0F70; RwFrameTranslate = (RwFrameTranslate_t)0x007F0E30; RpClumpForAllAtomics = (RpClumpForAllAtomics_t)0x00749B70; RwFrameAddChild = (RwFrameAddChild_t)0x007F0B00; @@ -34,6 +35,7 @@ void InitRwFunctions() RwTexDictionaryStreamWrite = (RwTexDictionaryStreamWrite_t)0x008049F0; rwD3D9NativeTextureRead = (rwD3D9NativeTextureRead_t)0x004CD820; RpPrtStdGlobalDataSetStreamEmbedded = (RpPrtStdGlobalDataSetStreamEmbedded_t)0x0041B350; + RpClumpRender = (RpClumpRender_t)0x00749B20; RpClumpRemoveAtomic = (RpClumpRemoveAtomic_t)0x0074A4C0; RpAtomicClone = (RpAtomicClone_t)0x00749E60; RwTexDictionaryFindNamedTexture = (RwTexDictionaryFindNamedTexture_t)0x007F39F0; diff --git a/Client/loader/MainFunctions.cpp b/Client/loader/MainFunctions.cpp index 9940fde94a..ed802555ab 100644 --- a/Client/loader/MainFunctions.cpp +++ b/Client/loader/MainFunctions.cpp @@ -863,15 +863,15 @@ void CheckDataFiles() { const char* expected; const char* fileName; - } integrityCheckList[] = {{"36CB1B284BC7CBB4F25CD00BBB044550", "bass.dll"}, {"1B909B47946167D153FB94020393E781", "bass_aac.dll"}, - {"E7E69A3B369F0ABA1A4A18C831BC4364", "bass_ac3.dll"}, {"E20A57EA7D845FADC9A48A0AA919121A", "bass_fx.dll"}, + } integrityCheckList[] = {{"36CB1B284BC7CBB4F25CD00BBB044550", "bass.dll"}, {"80CDC5A50B27C47E53B99DE4D4523698", "bass_aac.dll"}, + {"2757D3E0F63C8C62DB32F90D776AB815", "bass_ac3.dll"}, {"539BE2B8762FF618C3BA04B638FD4A8B", "bass_fx.dll"}, {"F47DCE69DAFAA06A55A4BC1F07F80C8A", "bassflac.dll"}, {"F246D72BA73E9624FE8BE66E785FB5C5", "bassmidi.dll"}, {"5DEEC10A943E352EF7E0223327E8B48C", "bassmix.dll"}, {"2F87C5E0A1B7B28C8FC0D7E74116DDFC", "bassopus.dll"}, {"0F1B2FC6C0C703A43A24DC05352E7ADA", "basswebm.dll"}, {"893113C6C49DC1E1EF288310E68DB306", "basswma.dll"}, {"C6A44FC3CF2F5801561804272217B14D", "D3DX9_42.dll"}, {"D439E8EDD8C93D7ADE9C04BCFE9197C6", "sa.dat"}, - {"B33B21DB610116262D906305CE65C354", "D3DCompiler_42.dll"}, {"02ECD2919B3DAA59D6014EEFD29FC294", "tags.dll"}, + {"B33B21DB610116262D906305CE65C354", "D3DCompiler_42.dll"}, {"7A1665DD46726DA4592E77DC05D114F8", "tags.dll"}, {"0B3DD892007FB366D1F52F2247C046F5", "d3dcompiler_43.dll"}, {"D5D8C8561C6DDA7EF0D7D6ABB0D772F4", "xinput1_3_mta.dll"}, - {"7096EB0458485D89BB749474550C7651", "d3dcompiler_47.dll"}, {"E2BAC93166B0C2AD4D83E97FC1E88F8F", "XInput9_1_0_mta.dll"}}; + {"7096EB0458485D89BB749474550C7651", "d3dcompiler_47.dll"}, {"87F689D5636B6F31DBB4B9CBF56E17E3", "XInput9_1_0_mta.dll"}}; for (const auto& item : integrityCheckList) { diff --git a/Client/mods/deathmatch/StdInc.h b/Client/mods/deathmatch/StdInc.h index 68b18a6ab5..465478454f 100644 --- a/Client/mods/deathmatch/StdInc.h +++ b/Client/mods/deathmatch/StdInc.h @@ -105,6 +105,7 @@ #include #include #include +#include #include #include #include diff --git a/Client/mods/deathmatch/logic/CClientBuilding.cpp b/Client/mods/deathmatch/logic/CClientBuilding.cpp index 61947a6bab..e26be9ebdd 100644 --- a/Client/mods/deathmatch/logic/CClientBuilding.cpp +++ b/Client/mods/deathmatch/logic/CClientBuilding.cpp @@ -110,11 +110,14 @@ void CClientBuilding::SetUsesCollision(bool state) if (m_usesCollision == state) return; - m_usesCollision = state; if (m_pBuilding) - { m_pBuilding->SetUsesCollision(state); - } + + // Remove all contacts + for (const auto& ped : m_Contacts) + RemoveContact(ped); + + m_usesCollision = state; } void CClientBuilding::Create() diff --git a/Client/mods/deathmatch/logic/CClientGame.cpp b/Client/mods/deathmatch/logic/CClientGame.cpp index 0f8cf2414b..87bf99f03d 100644 --- a/Client/mods/deathmatch/logic/CClientGame.cpp +++ b/Client/mods/deathmatch/logic/CClientGame.cpp @@ -251,6 +251,9 @@ CClientGame::CClientGame(bool bLocalPlay) : m_ServerInfo(new CServerInfo()) // Singular file download manager m_pSingularFileDownloadManager = new CSingularFileDownloadManager(); + // 3D model renderer + m_pModelRenderer = std::make_unique(); + // Register the message and the net packet handler g_pMultiplayer->SetPreWeaponFireHandler(CClientGame::PreWeaponFire); g_pMultiplayer->SetPostWeaponFireHandler(CClientGame::PostWeaponFire); @@ -267,6 +270,7 @@ CClientGame::CClientGame(bool bLocalPlay) : m_ServerInfo(new CServerInfo()) g_pMultiplayer->SetRender3DStuffHandler(CClientGame::StaticRender3DStuffHandler); g_pMultiplayer->SetPreRenderSkyHandler(CClientGame::StaticPreRenderSkyHandler); g_pMultiplayer->SetRenderHeliLightHandler(CClientGame::StaticRenderHeliLightHandler); + g_pMultiplayer->SetRenderEverythingBarRoadsHandler(CClientGame::StaticRenderEverythingBarRoadsHandler); g_pMultiplayer->SetChokingHandler(CClientGame::StaticChokingHandler); g_pMultiplayer->SetPreWorldProcessHandler(CClientGame::StaticPreWorldProcessHandler); g_pMultiplayer->SetPostWorldProcessHandler(CClientGame::StaticPostWorldProcessHandler); @@ -470,6 +474,7 @@ CClientGame::~CClientGame() g_pMultiplayer->SetRender3DStuffHandler(NULL); g_pMultiplayer->SetPreRenderSkyHandler(NULL); g_pMultiplayer->SetRenderHeliLightHandler(nullptr); + g_pMultiplayer->SetRenderEverythingBarRoadsHandler(nullptr); g_pMultiplayer->SetChokingHandler(NULL); g_pMultiplayer->SetPreWorldProcessHandler(NULL); g_pMultiplayer->SetPostWorldProcessHandler(NULL); @@ -3546,6 +3551,11 @@ void CClientGame::StaticRenderHeliLightHandler() g_pClientGame->GetManager()->GetPointLightsManager()->RenderHeliLightHandler(); } +void CClientGame::StaticRenderEverythingBarRoadsHandler() +{ + g_pClientGame->GetModelRenderer()->Render(); +} + bool CClientGame::StaticChokingHandler(unsigned char ucWeaponType) { return g_pClientGame->ChokingHandler(ucWeaponType); @@ -3853,6 +3863,8 @@ void CClientGame::PostWorldProcessPedsAfterPreRenderHandler() { CLuaArguments Arguments; m_pRootEntity->CallEvent("onClientPedsProcessed", Arguments, false); + + g_pClientGame->GetModelRenderer()->Update(); } void CClientGame::IdleHandler() @@ -5416,16 +5428,14 @@ void CClientGame::ResetMapInfo() m_bHudAreaNameDisabled = false; - // Gravity - g_pMultiplayer->SetLocalPlayerGravity(DEFAULT_GRAVITY); - g_pMultiplayer->SetGlobalGravity(DEFAULT_GRAVITY); - g_pGame->SetGravity(DEFAULT_GRAVITY); - - // Gamespeed - SetGameSpeed(DEFAULT_GAME_SPEED); - - // Game minute duration - SetMinuteDuration(DEFAULT_MINUTE_DURATION); + // Reset world special properties, world properties, weather properties etc + ResetWorldPropsInfo desc; + desc.resetSpecialProperties = true; + desc.resetWorldProperties = true; + desc.resetWeatherProperties = true; + desc.resetLODs = true; + desc.resetSounds = true; + ResetWorldProperties(desc); // Wanted-level SetWanted(0); @@ -5436,123 +5446,23 @@ void CClientGame::ResetMapInfo() // Weather m_pBlendedWeather->SetWeather(0); - // Rain - g_pGame->GetWeather()->ResetAmountOfRain(); - - // Wind - g_pMultiplayer->RestoreWindVelocity(); - - // Far clip distance - g_pMultiplayer->RestoreFarClipDistance(); - - // Near clip distance - g_pMultiplayer->RestoreNearClipDistance(); - - // Fog distance - g_pMultiplayer->RestoreFogDistance(); - - // Vehicles LOD distance - g_pGame->GetSettings()->ResetVehiclesLODDistance(true); - - // Peds LOD distance - g_pGame->GetSettings()->ResetPedsLODDistance(true); - - // Blur - g_pGame->GetSettings()->SetBlurControlledByScript(false); - g_pGame->GetSettings()->ResetBlurEnabled(); - - // Corona rain reflections - g_pGame->GetSettings()->SetCoronaReflectionsControlledByScript(false); - g_pGame->GetSettings()->ResetCoronaReflectionsEnabled(); - - // Sun color - g_pMultiplayer->ResetSunColor(); - - // Sun size - g_pMultiplayer->ResetSunSize(); - - // Sky-gradient - g_pMultiplayer->ResetSky(); - - // Heat haze - g_pMultiplayer->ResetHeatHaze(); - - // Water-colour - g_pMultiplayer->ResetWater(); - g_pMultiplayer->ResetColorFilter(); - // Grain effect g_pMultiplayer->SetGrainMultiplier(eGrainMultiplierType::ALL, 1.0f); g_pMultiplayer->SetGrainLevel(0); - // Water - GetManager()->GetWaterManager()->ResetWorldWaterLevel(); - - // Re-enable interior sounds and furniture - g_pMultiplayer->SetInteriorSoundsEnabled(true); - for (int i = 0; i <= 4; ++i) - g_pMultiplayer->SetInteriorFurnitureEnabled(i, true); - - // Clouds - g_pMultiplayer->SetCloudsEnabled(true); - g_pClientGame->SetCloudsEnabled(true); - - // Birds - g_pMultiplayer->DisableBirds(false); - g_pClientGame->SetBirdsEnabled(true); - - // Ambient sounds - g_pGame->GetAudioEngine()->ResetAmbientSounds(); - - // World sounds - g_pGame->GetAudioEngine()->ResetWorldSounds(); - // Cheats g_pGame->ResetCheats(); // Players m_pPlayerManager->ResetAll(); - // Jetpack max height - g_pGame->GetWorld()->SetJetpackMaxHeight(DEFAULT_JETPACK_MAXHEIGHT); - - // Aircraft max height - g_pGame->GetWorld()->SetAircraftMaxHeight(DEFAULT_AIRCRAFT_MAXHEIGHT); - - // Aircraft max velocity - g_pGame->GetWorld()->SetAircraftMaxVelocity(DEFAULT_AIRCRAFT_MAXVELOCITY); - - // Moon size - g_pMultiplayer->ResetMoonSize(); - - // World properties - g_pMultiplayer->ResetAmbientColor(); - g_pMultiplayer->ResetAmbientObjectColor(); - g_pMultiplayer->ResetDirectionalColor(); - g_pMultiplayer->ResetSpriteSize(); - g_pMultiplayer->ResetSpriteBrightness(); - g_pMultiplayer->ResetPoleShadowStrength(); - g_pMultiplayer->ResetShadowStrength(); - g_pMultiplayer->ResetShadowsOffset(); - g_pMultiplayer->ResetLightsOnGroundBrightness(); - g_pMultiplayer->ResetLowCloudsColor(); - g_pMultiplayer->ResetBottomCloudsColor(); - g_pMultiplayer->ResetCloudsAlpha1(); - g_pMultiplayer->ResetIllumination(); - g_pGame->GetWeather()->ResetWetRoads(); - g_pGame->GetWeather()->ResetFoggyness(); - g_pGame->GetWeather()->ResetFog(); - g_pGame->GetWeather()->ResetRainFog(); - g_pGame->GetWeather()->ResetWaterFog(); - g_pGame->GetWeather()->ResetSandstorm(); - g_pGame->GetWeather()->ResetRainbow(); + // Reset Frozen Time + g_pGame->GetClock()->ResetTimeFrozen(); + g_pGame->GetSettings()->ResetVolumetricShadows(); // Disable the change of any player stats g_pMultiplayer->SetLocalStatsStatic(true); - // Reset Frozen Time - g_pGame->GetClock()->ResetTimeFrozen(); - // Close all garages CGarage* pGarage = NULL; CGarages* pGarages = g_pCore->GetGame()->GetGarages(); @@ -6842,6 +6752,145 @@ void CClientGame::ReinitMarkers() g_pGame->Get3DMarkers()->ReinitMarkers(); } +void CClientGame::ResetWorldProperties(const ResetWorldPropsInfo& resetPropsInfo) +{ + // Reset all setWorldSpecialPropertyEnabled to default + if (resetPropsInfo.resetSpecialProperties) + { + g_pGame->SetCheatEnabled("hovercars", false); + g_pGame->SetCheatEnabled("aircars", false); + g_pGame->SetCheatEnabled("extrabunny", false); + g_pGame->SetCheatEnabled("extrajump", false); + + g_pGame->SetRandomFoliageEnabled(true); + g_pGame->SetMoonEasterEggEnabled(false); + g_pGame->SetExtraAirResistanceEnabled(true); + g_pGame->SetUnderWorldWarpEnabled(true); + g_pGame->SetVehicleSunGlareEnabled(false); + g_pGame->SetCoronaZTestEnabled(true); + g_pGame->SetWaterCreaturesEnabled(true); + g_pGame->SetBurnFlippedCarsEnabled(true); + g_pGame->SetFireballDestructEnabled(true); + g_pGame->SetRoadSignsTextEnabled(true); + g_pGame->SetExtendedWaterCannonsEnabled(true); + g_pGame->SetTunnelWeatherBlendEnabled(true); + } + + // Reset all setWorldProperty to default + if (resetPropsInfo.resetWorldProperties) + { + g_pMultiplayer->ResetAmbientColor(); + g_pMultiplayer->ResetAmbientObjectColor(); + g_pMultiplayer->ResetDirectionalColor(); + g_pMultiplayer->ResetSpriteSize(); + g_pMultiplayer->ResetSpriteBrightness(); + g_pMultiplayer->ResetPoleShadowStrength(); + g_pMultiplayer->ResetShadowStrength(); + g_pMultiplayer->ResetShadowsOffset(); + g_pMultiplayer->ResetLightsOnGroundBrightness(); + g_pMultiplayer->ResetLowCloudsColor(); + g_pMultiplayer->ResetBottomCloudsColor(); + g_pMultiplayer->ResetCloudsAlpha1(); + g_pMultiplayer->ResetIllumination(); + + CWeather* weather = g_pGame->GetWeather(); + weather->ResetWetRoads(); + weather->ResetFoggyness(); + weather->ResetFog(); + weather->ResetRainFog(); + weather->ResetWaterFog(); + weather->ResetSandstorm(); + weather->ResetRainbow(); + } + + // Reset all weather stuff like heat haze, wind velocity etc + if (resetPropsInfo.resetWeatherProperties) + { + g_pMultiplayer->ResetHeatHaze(); + g_pMultiplayer->RestoreFogDistance(); + g_pMultiplayer->ResetMoonSize(); + g_pMultiplayer->ResetSky(); + g_pMultiplayer->ResetSunColor(); + g_pMultiplayer->ResetSunSize(); + g_pMultiplayer->RestoreWindVelocity(); + g_pMultiplayer->ResetColorFilter(); + + g_pGame->GetWeather()->ResetAmountOfRain(); + } + + // Reset LODs + if (resetPropsInfo.resetLODs) + { + g_pGame->GetSettings()->ResetVehiclesLODDistance(true); + g_pGame->GetSettings()->ResetPedsLODDistance(true); + } + + // Reset & restore sounds + if (resetPropsInfo.resetSounds) + { + g_pMultiplayer->SetInteriorSoundsEnabled(true); + g_pGame->GetAudioEngine()->ResetAmbientSounds(); + g_pGame->GetAudioEngine()->ResetWorldSounds(); + } + + // Reset all other world stuff + // Reset clip distances + g_pMultiplayer->RestoreFarClipDistance(); + g_pMultiplayer->RestoreNearClipDistance(); + + // Reset clouds + g_pMultiplayer->SetCloudsEnabled(true); + SetCloudsEnabled(true); + + // Reset birds + g_pMultiplayer->DisableBirds(false); + SetBirdsEnabled(true); + + // Reset occlusions + g_pGame->GetWorld()->SetOcclusionsEnabled(true); + + // Reset gravity + g_pMultiplayer->SetGlobalGravity(DEFAULT_GRAVITY); + g_pCore->GetMultiplayer()->SetLocalPlayerGravity(DEFAULT_GRAVITY); + g_pGame->SetGravity(DEFAULT_GRAVITY); + + // Reset game speed + g_pGame->SetGameSpeed(DEFAULT_GAME_SPEED); + + // Reset aircraft max velocity & height + g_pMultiplayer->SetAircraftMaxHeight(DEFAULT_AIRCRAFT_MAXHEIGHT); + g_pMultiplayer->SetAircraftMaxVelocity(DEFAULT_AIRCRAFT_MAXVELOCITY); + + // Reset jetpack max height + g_pGame->GetWorld()->SetJetpackMaxHeight(DEFAULT_JETPACK_MAXHEIGHT); + + // Restore furnitures in the interiors + for (std::uint8_t i = 0; i <= 4; ++i) + g_pMultiplayer->SetInteriorFurnitureEnabled(i, true); + + // Reset minute duration + SetMinuteDuration(DEFAULT_MINUTE_DURATION); + + // Reset blur level + g_pGame->GetSettings()->SetBlurControlledByScript(false); + g_pGame->GetSettings()->ResetBlurEnabled(); + + // Reset corona reflections + g_pGame->GetSettings()->SetCoronaReflectionsControlledByScript(false); + g_pGame->GetSettings()->ResetCoronaReflectionsEnabled(); + + // Reset traffic lights + g_pMultiplayer->SetTrafficLightsLocked(false); + + // Reset water color, water level & wave height + g_pMultiplayer->ResetWater(); + GetManager()->GetWaterManager()->ResetWorldWaterLevel(); + GetManager()->GetWaterManager()->SetWaveLevel(0.0f); + + // Reset volumetric shadows + g_pGame->GetSettings()->ResetVolumetricShadows(); +} + void CClientGame::OnWindowFocusChange(bool state) { if (state == m_bFocused) diff --git a/Client/mods/deathmatch/logic/CClientGame.h b/Client/mods/deathmatch/logic/CClientGame.h index f2c290d94c..ba6bc29334 100644 --- a/Client/mods/deathmatch/logic/CClientGame.h +++ b/Client/mods/deathmatch/logic/CClientGame.h @@ -71,6 +71,15 @@ struct SMiscGameSettings bool bAllowShotgunDamageFix; }; +struct ResetWorldPropsInfo +{ + bool resetSpecialProperties{}; + bool resetWorldProperties{}; + bool resetWeatherProperties{}; + bool resetLODs{}; + bool resetSounds{}; +}; + class CClientGame { friend class CPacketHandler; @@ -308,6 +317,8 @@ class CClientGame CRemoteCalls* GetRemoteCalls() { return m_pRemoteCalls; } CResourceFileDownloadManager* GetResourceFileDownloadManager() { return m_pResourceFileDownloadManager; } + CModelRenderer* GetModelRenderer() const noexcept { return m_pModelRenderer.get(); } + SharedUtil::CAsyncTaskScheduler* GetAsyncTaskScheduler() { return m_pAsyncTaskScheduler; } // Status toggles @@ -408,6 +419,8 @@ class CClientGame bool SetBirdsEnabled(bool bEnabled); bool GetBirdsEnabled(); + void ResetWorldProperties(const ResetWorldPropsInfo& resetPropsInfo); + CTransferBox* GetTransferBox() { return m_pTransferBox; }; void ChangeVehicleWeapon(bool bNext); @@ -504,6 +517,7 @@ class CClientGame static void StaticRender3DStuffHandler(); static void StaticPreRenderSkyHandler(); static void StaticRenderHeliLightHandler(); + static void StaticRenderEverythingBarRoadsHandler(); static bool StaticChokingHandler(unsigned char ucWeaponType); static void StaticPreWorldProcessHandler(); static void StaticPostWorldProcessHandler(); @@ -698,6 +712,8 @@ class CClientGame CRemoteCalls* m_pRemoteCalls; CResourceFileDownloadManager* m_pResourceFileDownloadManager; + std::unique_ptr m_pModelRenderer; + // Revised facilities CServer m_Server; diff --git a/Client/mods/deathmatch/logic/CClientModel.cpp b/Client/mods/deathmatch/logic/CClientModel.cpp index 75d6bbfd12..fd1e6e4ab5 100644 --- a/Client/mods/deathmatch/logic/CClientModel.cpp +++ b/Client/mods/deathmatch/logic/CClientModel.cpp @@ -84,9 +84,6 @@ bool CClientModel::Deallocate() if (!m_bAllocatedByUs) return false; - if (m_pParentResource) - m_pParentResource->GetResourceModelStreamer()->FullyReleaseModel(m_iModelID); - SetParentResource(nullptr); CModelInfo* pModelInfo = g_pGame->GetModelInfo(m_iModelID, true); @@ -216,7 +213,7 @@ void CClientModel::RestoreDFF(CModelInfo* pModelInfo) bool CClientModel::AllocateTXD(std::string &strTxdName) { - uint uiSlotID = g_pGame->GetPools()->GetTxdPool().AllocateTextureDictonarySlot(m_iModelID - MAX_MODEL_DFF_ID, strTxdName); + std::uint32_t uiSlotID = g_pGame->GetPools()->GetTxdPool().AllocateTextureDictonarySlot(m_iModelID - MAX_MODEL_DFF_ID, strTxdName); if (uiSlotID != -1) { m_bAllocatedByUs = true; diff --git a/Client/mods/deathmatch/logic/CClientModelManager.cpp b/Client/mods/deathmatch/logic/CClientModelManager.cpp index 05c80ae26f..9b4ae7cc39 100644 --- a/Client/mods/deathmatch/logic/CClientModelManager.cpp +++ b/Client/mods/deathmatch/logic/CClientModelManager.cpp @@ -49,6 +49,9 @@ bool CClientModelManager::Remove(const std::shared_ptr& pModel) int modelId = pModel->GetModelID(); if (m_Models[modelId] != nullptr) { + CResource* parentResource = m_Models[modelId]->GetParentResource(); + if (parentResource) + parentResource->GetResourceModelStreamer()->FullyReleaseModel(modelId); m_Models[modelId]->RestoreEntitiesUsingThisModel(); m_Models[modelId] = nullptr; m_modelCount--; @@ -73,7 +76,7 @@ int CClientModelManager::GetFirstFreeModelID(void) int CClientModelManager::GetFreeTxdModelID() { - ushort usTxdId = g_pGame->GetPools()->GetTxdPool().GetFreeTextureDictonarySlot(); + std::uint16_t usTxdId = g_pGame->GetPools()->GetTxdPool().GetFreeTextureDictonarySlot(); if (usTxdId == -1) return INVALID_MODEL_ID; return MAX_MODEL_DFF_ID + usTxdId; diff --git a/Client/mods/deathmatch/logic/CClientObject.cpp b/Client/mods/deathmatch/logic/CClientObject.cpp index 27eacc0efa..7d34045f1b 100644 --- a/Client/mods/deathmatch/logic/CClientObject.cpp +++ b/Client/mods/deathmatch/logic/CClientObject.cpp @@ -400,9 +400,11 @@ void CClientObject::SetScale(const CVector& vecScale) void CClientObject::SetCollisionEnabled(bool bCollisionEnabled) { if (m_pObject) - { m_pObject->SetUsesCollision(bCollisionEnabled); - } + + // Remove all contacts + for (const auto& ped : m_Contacts) + RemoveContact(ped); m_bUsesCollision = bCollisionEnabled; } diff --git a/Client/mods/deathmatch/logic/CClientPad.cpp b/Client/mods/deathmatch/logic/CClientPad.cpp index f8c802ccbb..2f68b90baf 100644 --- a/Client/mods/deathmatch/logic/CClientPad.cpp +++ b/Client/mods/deathmatch/logic/CClientPad.cpp @@ -336,11 +336,9 @@ bool CClientPad::GetControlState(const char* szName, CControllerState& State, bo return State.LeftShoulder2 == 255; break; // zoom out case 9: - return false; - break; // enter_exit + return State.ButtonTriangle == 255; // enter_exit case 10: - return false; - break; // change_cam + return State.Select == 255; // change_cam case 11: return State.ButtonSquare == 255; break; // jump @@ -432,8 +430,7 @@ bool CClientPad::GetControlState(const char* szName, CControllerState& State, bo return State.RightShoulder2 == 255; break; // look right case 33: - return false; - break; // look behind + return State.LeftShoulder2 == 255 && State.RightShoulder2 == 255; // look behind case 34: return false; break; // mouse look diff --git a/Client/mods/deathmatch/logic/CClientPed.cpp b/Client/mods/deathmatch/logic/CClientPed.cpp index 5716bea120..f4c9ba5ee6 100644 --- a/Client/mods/deathmatch/logic/CClientPed.cpp +++ b/Client/mods/deathmatch/logic/CClientPed.cpp @@ -1394,6 +1394,10 @@ void CClientPed::WarpIntoVehicle(CClientVehicle* pVehicle, unsigned int uiSeat) } } + // Wrong seat or undefined passengers count? + if ((uiSeat > 0 && uiSeat > pVehicle->m_ucMaxPassengers) || (uiSeat > 0 && pVehicle->m_ucMaxPassengers == 255)) + return; + // Transfer WaitingForGroundToLoad state to vehicle if (m_bIsLocalPlayer) { @@ -5691,28 +5695,6 @@ bool CClientPed::IsRunningAnimation() return (m_AnimationCache.bLoop && m_pAnimationBlock); } -void CClientPed::RunAnimation(AssocGroupId animGroup, AnimationId animID) -{ - KillAnimation(); - - if (m_pPlayerPed) - { - // Remove jetpack now so it doesn't stay on (#9522#c25612) - if (HasJetPack()) - SetHasJetPack(false); - - // Let's not choke them any longer - if (IsChoking()) - SetChoking(false); - - CTask* pTask = g_pGame->GetTasks()->CreateTaskSimpleRunAnim(animGroup, animID, 4.0f, TASK_SIMPLE_ANIM, "TASK_SIMPLE_ANIM"); - if (pTask) - { - pTask->SetAsPedTask(m_pPlayerPed, TASK_PRIORITY_PRIMARY); - } - } -} - void CClientPed::RunNamedAnimation(std::unique_ptr& pBlock, const char* szAnimName, int iTime, int iBlend, bool bLoop, bool bUpdatePosition, bool bInterruptable, bool bFreezeLastFrame, bool bRunInSequence, bool bOffsetPed, bool bHoldLastFrame) { diff --git a/Client/mods/deathmatch/logic/CClientPed.h b/Client/mods/deathmatch/logic/CClientPed.h index 688dba501f..6998856774 100644 --- a/Client/mods/deathmatch/logic/CClientPed.h +++ b/Client/mods/deathmatch/logic/CClientPed.h @@ -460,7 +460,6 @@ class CClientPed : public CClientStreamElement, public CAntiCheatModule bool GetRunningAnimationName(SString& strBlockName, SString& strAnimName); bool IsRunningAnimation(); - void RunAnimation(AssocGroupId animGroup, AnimationId animID); void RunNamedAnimation(std::unique_ptr& pBlock, const char* szAnimName, int iTime = -1, int iBlend = 250, bool bLoop = true, bool bUpdatePosition = true, bool bInterruptable = false, bool bFreezeLastFrame = true, bool bRunInSequence = false, bool bOffsetPed = false, bool bHoldLastFrame = false); diff --git a/Client/mods/deathmatch/logic/CClientVehicle.cpp b/Client/mods/deathmatch/logic/CClientVehicle.cpp index b1b00cfba3..537f9457dd 100644 --- a/Client/mods/deathmatch/logic/CClientVehicle.cpp +++ b/Client/mods/deathmatch/logic/CClientVehicle.cpp @@ -1644,6 +1644,10 @@ void CClientVehicle::SetCollisionEnabled(bool bCollisionEnabled) if (m_pVehicle && m_bHasAdjustableProperty) m_pVehicle->SetUsesCollision(bCollisionEnabled); + // Remove all contacts + for (const auto& ped : m_Contacts) + RemoveContact(ped); + m_bIsCollisionEnabled = bCollisionEnabled; } @@ -2652,7 +2656,12 @@ void CClientVehicle::Create() { if (m_pPassengers[i]) { - m_pPassengers[i]->WarpIntoVehicle(this, i + 1); + // Undefined passengers count? + if (m_ucMaxPassengers != 255) + m_pPassengers[i]->WarpIntoVehicle(this, i + 1); + else + m_pPassengers[i]->SetWarpInToVehicleRequired(false); + if (m_pPassengers[i]) m_pPassengers[i]->StreamIn(true); } @@ -5033,6 +5042,14 @@ void CClientVehicle::ResetWheelScale() m_bWheelScaleChanged = false; } +bool CClientVehicle::SpawnFlyingComponent(const eCarNodes& nodeID, const eCarComponentCollisionTypes& collisionType, std::int32_t removalTime) +{ + if (!m_pVehicle) + return false; + + return m_pVehicle->SpawnFlyingComponent(nodeID, collisionType, removalTime); +} + CVector CClientVehicle::GetEntryPoint(std::uint32_t entryPointIndex) { static const uint32_t lookup[4] = {10, 8, 11, 9}; diff --git a/Client/mods/deathmatch/logic/CClientVehicle.h b/Client/mods/deathmatch/logic/CClientVehicle.h index e2c83c618e..76ec08eff1 100644 --- a/Client/mods/deathmatch/logic/CClientVehicle.h +++ b/Client/mods/deathmatch/logic/CClientVehicle.h @@ -543,6 +543,8 @@ class CClientVehicle : public CClientStreamElement bool SetDummyPosition(eVehicleDummies dummy, const CVector& position); bool ResetDummyPositions(); + bool SpawnFlyingComponent(const eCarNodes& nodeID, const eCarComponentCollisionTypes& collisionType, std::int32_t removalTime); + CVector GetEntryPoint(std::uint32_t entryPointIndex); protected: diff --git a/Client/mods/deathmatch/logic/CModelRenderer.cpp b/Client/mods/deathmatch/logic/CModelRenderer.cpp new file mode 100644 index 0000000000..2f06c836ec --- /dev/null +++ b/Client/mods/deathmatch/logic/CModelRenderer.cpp @@ -0,0 +1,72 @@ +/***************************************************************************** + * + * PROJECT: Multi Theft Auto v1.0 + * LICENSE: See LICENSE in the top level directory + * FILE: mods/deathmatch/logic/CModelRenderer.cpp + * PURPOSE: 3D models renderer + * + * Multi Theft Auto is available from http://www.multitheftauto.com/ + * + *****************************************************************************/ + +#include "StdInc.h" +#include "game\CRenderer.h" +#include "game\CVisibilityPlugins.h" + +bool CModelRenderer::EnqueueModel(CModelInfo* pModelInfo, const CMatrix& matrix) +{ + if (g_pCore->IsWindowMinimized()) + return false; + + if (pModelInfo && pModelInfo->IsLoaded()) + { + m_Queue.emplace_back(pModelInfo, matrix); + return true; + } + + return false; +} + +void CModelRenderer::Update() +{ + CVisibilityPlugins* pVisibilityPlugins = g_pGame->GetVisibilityPlugins(); + assert(pVisibilityPlugins); + + for (auto& modelDesc : m_Queue) + { + // Insert transparent entities into a sorted list + if (modelDesc.pModelInfo->GetIdeFlag(eModelIdeFlag::DRAW_LAST)) + { + const CVector& vecCameraPosition = *(CVector*)0xB76870; // CRenderer::ms_vecCameraPosition + const float fDistance = (modelDesc.matrix.GetPosition() - vecCameraPosition).Length(); + + pVisibilityPlugins->InsertEntityIntoEntityList(&modelDesc, fDistance, RenderEntity); + } + } +} + +void CModelRenderer::Render() +{ + CRenderer* pRenderer = g_pGame->GetRenderer(); + assert(pRenderer); + + // Draw opaque entities + for (auto& modelDesc : m_Queue) + { + if (modelDesc.pModelInfo->IsLoaded() && !modelDesc.pModelInfo->GetIdeFlag(eModelIdeFlag::DRAW_LAST)) + pRenderer->RenderModel(modelDesc.pModelInfo, modelDesc.matrix); + } + + m_Queue.clear(); +} + +void CModelRenderer::RenderEntity(SModelToRender* modelDesc, float distance) +{ + if (!modelDesc->pModelInfo->IsLoaded()) + return; + + CRenderer* pRenderer = g_pGame->GetRenderer(); + assert(pRenderer); + + pRenderer->RenderModel(modelDesc->pModelInfo, modelDesc->matrix); +} diff --git a/Client/mods/deathmatch/logic/CModelRenderer.h b/Client/mods/deathmatch/logic/CModelRenderer.h new file mode 100644 index 0000000000..d923db6c7f --- /dev/null +++ b/Client/mods/deathmatch/logic/CModelRenderer.h @@ -0,0 +1,40 @@ +/***************************************************************************** + * + * PROJECT: Multi Theft Auto v1.0 + * LICENSE: See LICENSE in the top level directory + * FILE: mods/deathmatch/logic/CModelRenderer.h + * PURPOSE: 3D models renderer + * + * Multi Theft Auto is available from http://www.multitheftauto.com/ + * + *****************************************************************************/ + +#pragma once + +class CModelRenderer final +{ +public: + struct SModelToRender final + { + CModelInfo* pModelInfo; + CMatrix matrix; + + SModelToRender(CModelInfo* pModelInfo, const CMatrix& matrix) : + pModelInfo(pModelInfo), + matrix(matrix) + { + } + }; + + bool EnqueueModel(CModelInfo* pModelInfo, const CMatrix& matrix); + + void Update(); + + void Render(); + + static void RenderEntity(SModelToRender* entity, float distance); + +private: + + std::vector m_Queue; +}; diff --git a/Client/mods/deathmatch/logic/CPacketHandler.cpp b/Client/mods/deathmatch/logic/CPacketHandler.cpp index ed8ba623c1..ebf2ba5140 100644 --- a/Client/mods/deathmatch/logic/CPacketHandler.cpp +++ b/Client/mods/deathmatch/logic/CPacketHandler.cpp @@ -2724,6 +2724,7 @@ void CPacketHandler::Packet_EntityAdd(NetBitStreamInterface& bitStream) // bool (1) - static // SObjectHealthSync (?) - health // bool (1) - is break + // bool (1) - respawnable // Pickups: // CVector (12) - position @@ -3089,7 +3090,10 @@ void CPacketHandler::Packet_EntityAdd(NetBitStreamInterface& bitStream) if (bitStream.ReadBit()) pObject->Break(); } - + + if (bitStream.Can(eBitStreamVersion::RespawnObject_Serverside)) + pObject->SetRespawnEnabled(bitStream.ReadBit()); + pObject->SetCollisionEnabled(bCollisonsEnabled); if (ucEntityTypeID == CClientGame::WEAPON) { diff --git a/Client/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp b/Client/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp index da92891265..5efe5b417e 100644 --- a/Client/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp +++ b/Client/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp @@ -28,7 +28,7 @@ #include #include #include -#include +#include using std::list; diff --git a/Client/mods/deathmatch/logic/CStaticFunctionDefinitions.h b/Client/mods/deathmatch/logic/CStaticFunctionDefinitions.h index 2d1ce8c88a..188e249f2d 100644 --- a/Client/mods/deathmatch/logic/CStaticFunctionDefinitions.h +++ b/Client/mods/deathmatch/logic/CStaticFunctionDefinitions.h @@ -167,8 +167,10 @@ class CStaticFunctionDefinitions static bool SetPedCanBeKnockedOffBike(CClientEntity& Entity, bool bCanBeKnockedOffBike); static bool SetPedAnimation(CClientEntity& Entity, const SString& strBlockName, const char* szAnimName, int iTime, int iBlend, bool bLoop, bool bUpdatePosition, bool bInterruptable, bool bFreezeLastFrame); - static bool SetPedAnimationProgress(CClientEntity& Entity, const SString& strAnimName, float fProgress); - static bool SetPedAnimationSpeed(CClientEntity& Entity, const SString& strAnimName, float fSpeed); + + static bool SetPedAnimationProgress(CClientEntity& Entity, const SString& strAnimName, float fProgress); + static bool SetPedAnimationSpeed(CClientEntity& Entity, const SString& strAnimName, float fSpeed); + static bool SetPedMoveAnim(CClientEntity& Entity, unsigned int iMoveAnim); static bool AddPedClothes(CClientEntity& Entity, const char* szTexture, const char* szModel, unsigned char ucType); static bool RemovePedClothes(CClientEntity& Entity, unsigned char ucType); diff --git a/Client/mods/deathmatch/logic/lua/CLuaFunctionDefs.Util.cpp b/Client/mods/deathmatch/logic/lua/CLuaFunctionDefs.Util.cpp index 641a76b04b..978fb139e8 100644 --- a/Client/mods/deathmatch/logic/lua/CLuaFunctionDefs.Util.cpp +++ b/Client/mods/deathmatch/logic/lua/CLuaFunctionDefs.Util.cpp @@ -12,27 +12,40 @@ int CLuaFunctionDefs::GetValidPedModels(lua_State* luaVM) { - int iIndex = 0; + bool includeCustom; + CScriptArgReader argStream(luaVM); + argStream.ReadBool(includeCustom, true); + + auto* modelManager = g_pClientGame->GetManager()->GetModelManager(); + + std::size_t index = 0; lua_newtable(luaVM); - // Gather GTASA default skins - for (int i = 0; i <= 312; i++) + // Gather default and possibly custom GTASA ped model IDs + for (std::size_t i = 0; i <= 312; i++) { if (CClientPlayerManager::IsValidModel(i)) { - lua_pushnumber(luaVM, ++iIndex); + // Skip custom skins if not requested + if (!includeCustom && modelManager->FindModelByID(i)) + continue; + + lua_pushnumber(luaVM, ++index); lua_pushnumber(luaVM, i); lua_settable(luaVM, -3); } } - // Gather our custom skin model IDs allocated with engineRequestModel - // (there might be some < 313 as well, and since we don't want duplicates, we start at 313, others are already included by the loop above) - for (const auto& model : m_pManager->GetModelManager()->GetModelsByType(eClientModelType::PED, 313)) + if (includeCustom) { - lua_pushnumber(luaVM, ++iIndex); - lua_pushnumber(luaVM, model->GetModelID()); - lua_settable(luaVM, -3); + // Gather the rest of custom skin model IDs allocated with engineRequestModel + // (there are usually some < 313 as well, and since we don't want duplicates, we start at 313, others are already included by the loop above) + for (const auto& model : m_pManager->GetModelManager()->GetModelsByType(eClientModelType::PED, 313)) + { + lua_pushnumber(luaVM, ++index); + lua_pushnumber(luaVM, model->GetModelID()); + lua_settable(luaVM, -3); + } } return 1; diff --git a/Client/mods/deathmatch/logic/lua/CLuaMain.cpp b/Client/mods/deathmatch/logic/lua/CLuaMain.cpp index 446fdc866e..6b794be016 100644 --- a/Client/mods/deathmatch/logic/lua/CLuaMain.cpp +++ b/Client/mods/deathmatch/logic/lua/CLuaMain.cpp @@ -127,6 +127,7 @@ void CLuaMain::InitClasses(lua_State* luaVM) CLuaVehicleDefs::AddClass(luaVM); CLuaWaterDefs::AddClass(luaVM); CLuaWeaponDefs::AddClass(luaVM); + CLuaBuildingDefs::AddClass(luaVM); CLuaShared::AddClasses(luaVM); } diff --git a/Client/mods/deathmatch/logic/lua/CLuaTimerManager.cpp b/Client/mods/deathmatch/logic/lua/CLuaTimerManager.cpp index 317de7f16d..4c70d03f04 100644 --- a/Client/mods/deathmatch/logic/lua/CLuaTimerManager.cpp +++ b/Client/mods/deathmatch/logic/lua/CLuaTimerManager.cpp @@ -21,7 +21,10 @@ void CLuaTimerManager::DoPulse(CLuaMain* pLuaMain) // Use a separate queue to avoid trouble for (CFastList::const_iterator iter = m_TimerList.begin(); iter != m_TimerList.end(); iter++) - m_ProcessQueue.push_back(*iter); + { + if (!(*iter)->IsPaused()) + m_ProcessQueue.push_back(*iter); + } while (!m_ProcessQueue.empty()) { @@ -108,6 +111,16 @@ void CLuaTimerManager::RemoveAllTimers() m_pProcessingTimer = NULL; } +void CLuaTimerManager::SetTimerPaused(CLuaTimer* timer, bool paused) +{ + assert(timer); + + timer->SetPaused(paused); + if (paused) + ListRemove(m_ProcessQueue, timer); +} + + void CLuaTimerManager::ResetTimer(CLuaTimer* pLuaTimer) { assert(pLuaTimer); diff --git a/Client/mods/deathmatch/logic/lua/CLuaTimerManager.h b/Client/mods/deathmatch/logic/lua/CLuaTimerManager.h index 055b644fcb..c4f97d2626 100644 --- a/Client/mods/deathmatch/logic/lua/CLuaTimerManager.h +++ b/Client/mods/deathmatch/logic/lua/CLuaTimerManager.h @@ -36,6 +36,7 @@ class CLuaTimerManager void RemoveAllTimers(); unsigned long GetTimerCount() const { return m_TimerList.size(); } + void SetTimerPaused(CLuaTimer* timer, bool paused); void ResetTimer(CLuaTimer* pLuaTimer); CFastList::const_iterator IterBegin() { return m_TimerList.begin(); } diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaBuildingDefs.cpp b/Client/mods/deathmatch/logic/luadefs/CLuaBuildingDefs.cpp index f45efbf09c..bcb765e712 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaBuildingDefs.cpp +++ b/Client/mods/deathmatch/logic/luadefs/CLuaBuildingDefs.cpp @@ -30,10 +30,10 @@ void CLuaBuildingDefs::AddClass(lua_State* luaVM) lua_classfunction(luaVM, "create", "createBuilding"); - lua_registerclass(luaVM, "Building"); + lua_registerclass(luaVM, "Building", "Element"); } -CClientBuilding* CLuaBuildingDefs::CreateBuilding(lua_State* const luaVM, uint16_t modelId, CVector pos, CVector rot, std::optional interior) +CClientBuilding* CLuaBuildingDefs::CreateBuilding(lua_State* const luaVM, std::uint16_t modelId, CVector pos, std::optional rot, std::optional interior) { CLuaMain* pLuaMain = m_pLuaManager->GetVirtualMachine(luaVM); @@ -48,11 +48,14 @@ CClientBuilding* CLuaBuildingDefs::CreateBuilding(lua_State* const luaVM, uint16 if (!CClientBuildingManager::IsValidPosition(pos)) throw std::invalid_argument("Position is outside of game world"); - ConvertDegreesToRadians(rot); + if (rot.has_value()) + ConvertDegreesToRadians(rot.value()); + else + rot.emplace(CVector(0, 0, 0)); m_pBuildingManager->ResizePoolIfNeeds(); - CClientBuilding* pBuilding = new CClientBuilding(m_pManager, INVALID_ELEMENT_ID, modelId, pos, rot, interior.value_or(0)); + CClientBuilding* pBuilding = new CClientBuilding(m_pManager, INVALID_ELEMENT_ID, modelId, pos, rot.value() , interior.value_or(0)); CClientEntity* pRoot = pResource->GetResourceDynamicEntity(); pBuilding->SetParent(pRoot); diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaBuildingDefs.h b/Client/mods/deathmatch/logic/luadefs/CLuaBuildingDefs.h index 628d320844..a244c74bbb 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaBuildingDefs.h +++ b/Client/mods/deathmatch/logic/luadefs/CLuaBuildingDefs.h @@ -19,7 +19,7 @@ class CLuaBuildingDefs : public CLuaDefs static void AddClass(lua_State* luaVM); // Buiding create funcs - static CClientBuilding* CreateBuilding(lua_State* const luaVM, uint16_t modelId, CVector pos, CVector rot, std::optional interior); + static CClientBuilding* CreateBuilding(lua_State* const luaVM, std::uint16_t modelId, CVector pos, std::optional rot, std::optional interior); static void RemoveAllGameBuildings(); static void RestoreGameBuildings(); }; diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaDrawingDefs.cpp b/Client/mods/deathmatch/logic/luadefs/CLuaDrawingDefs.cpp index e30b7f3ba2..f54378944d 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaDrawingDefs.cpp +++ b/Client/mods/deathmatch/logic/luadefs/CLuaDrawingDefs.cpp @@ -36,6 +36,7 @@ void CLuaDrawingDefs::LoadFunctions() {"dxDrawMaterialPrimitive", DxDrawMaterialPrimitive}, {"dxDrawMaterialPrimitive3D", DxDrawMaterialPrimitive3D}, {"dxDrawWiredSphere", ArgumentParser}, + {"dxDrawModel3D", ArgumentParser}, {"dxGetTextWidth", DxGetTextWidth}, {"dxGetTextSize", ArgumentParser}, {"dxGetFontHeight", DxGetFontHeight}, @@ -2121,3 +2122,21 @@ bool CLuaDrawingDefs::DxDrawWiredSphere(lua_State* const luaVM, const CVector po g_pCore->GetGraphics()->DrawWiredSphere(position, radius, color.value(), lineWidth.value_or(1), iterations.value_or(1)); return true; } + +bool CLuaDrawingDefs::DxDrawModel3D(std::uint32_t modelID, CVector position, CVector rotation, const std::optional scale) +{ + CModelInfo* pModelInfo = g_pGame->GetModelInfo(modelID); + if (!pModelInfo) + throw std::invalid_argument("Invalid model ID"); + + if (auto modelType = pModelInfo->GetModelType(); + modelType == eModelInfoType::UNKNOWN || modelType == eModelInfoType::VEHICLE || modelType == eModelInfoType::PED) + { + throw std::invalid_argument("Invalid model type"); + } + + ConvertDegreesToRadians(rotation); + + return g_pClientGame->GetModelRenderer()->EnqueueModel(pModelInfo, + CMatrix{position, rotation, scale.value_or(CVector{1.0f, 1.0f, 1.0f})}); +} diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaDrawingDefs.h b/Client/mods/deathmatch/logic/luadefs/CLuaDrawingDefs.h index 0bda34f5e9..55dc3adda1 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaDrawingDefs.h +++ b/Client/mods/deathmatch/logic/luadefs/CLuaDrawingDefs.h @@ -82,6 +82,8 @@ class CLuaDrawingDefs : public CLuaDefs static bool DxDrawWiredSphere(lua_State* const luaVM, const CVector position, const float radius, const std::optional color, const std::optional lineWidth, const std::optional iterations); + static bool DxDrawModel3D(std::uint32_t modelID, CVector position, CVector rotation, const std::optional scale); + private: static void AddDxMaterialClass(lua_State* luaVM); static void AddDxTextureClass(lua_State* luaVM); diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaObjectDefs.cpp b/Client/mods/deathmatch/logic/luadefs/CLuaObjectDefs.cpp index c47934bc07..6dd306336e 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaObjectDefs.cpp +++ b/Client/mods/deathmatch/logic/luadefs/CLuaObjectDefs.cpp @@ -25,6 +25,7 @@ void CLuaObjectDefs::LoadFunctions() {"getObjectMass", GetObjectMass}, {"getObjectProperty", GetObjectProperty}, {"isObjectMoving", ArgumentParser}, + {"isObjectRespawnable", ArgumentParser}, // Object set funcs {"moveObject", MoveObject}, @@ -61,6 +62,7 @@ void CLuaObjectDefs::AddClass(lua_State* luaVM) lua_classfunction(luaVM, "getProperties", GetObjectProperties); lua_classfunction(luaVM, "getProperty", "getObjectProperty"); lua_classfunction(luaVM, "isMoving", "isObjectMoving"); + lua_classfunction(luaVM, "isRespawnable", "isObjectRespawnable"); lua_classfunction(luaVM, "setScale", "setObjectScale"); lua_classfunction(luaVM, "setBreakable", "setObjectBreakable"); @@ -272,7 +274,7 @@ int CLuaObjectDefs::GetObjectProperty(lua_State* luaVM) lua_setfield(luaVM, -2, EnumToString(eObjectProperty::OBJECT_PROPERTY_TURNMASS)); lua_pushnumber(luaVM, pObject->GetAirResistance()); - lua_setfield(luaVM, -2, EnumToString(eObjectProperty::OBJECT_PROPERTY_TURNMASS)); + lua_setfield(luaVM, -2, EnumToString(eObjectProperty::OBJECT_PROPERTY_AIRRESISTANCE)); lua_pushnumber(luaVM, pObject->GetElasticity()); lua_setfield(luaVM, -2, EnumToString(eObjectProperty::OBJECT_PROPERTY_ELASTICITY)); @@ -707,3 +709,15 @@ int CLuaObjectDefs::SetObjectProperty(lua_State* luaVM) lua_pushboolean(luaVM, false); return 1; } + +bool CLuaObjectDefs::IsObjectRespawnable(CClientEntity* const pEntity) noexcept +{ + if (!IS_OBJECT(pEntity)) + return false; + + auto* pObject = static_cast(pEntity); + if (!pObject) + return false; + + return pObject->IsRespawnEnabled(); +} diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaObjectDefs.h b/Client/mods/deathmatch/logic/luadefs/CLuaObjectDefs.h index e614ef9f29..1ce12ad20e 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaObjectDefs.h +++ b/Client/mods/deathmatch/logic/luadefs/CLuaObjectDefs.h @@ -29,6 +29,7 @@ class CLuaObjectDefs : public CLuaDefs LUA_DECLARE(GetObjectMass); LUA_DECLARE(GetObjectProperty); LUA_DECLARE(GetObjectProperties); + static bool IsObjectRespawnable(CClientEntity* const pEntity) noexcept; // Object set funcs LUA_DECLARE(SetObjectRotation); diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.cpp b/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.cpp index 63c3711064..f38096dcee 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.cpp +++ b/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.cpp @@ -12,7 +12,9 @@ #include "StdInc.h" #include #include "lua/CLuaFunctionParser.h" -#include "CMatrix_Pad.h" +#include +#include +#include #define MIN_CLIENT_REQ_REMOVEPEDFROMVEHICLE_CLIENTSIDE "1.3.0-9.04482" #define MIN_CLIENT_REQ_WARPPEDINTOVEHICLE_CLIENTSIDE "1.3.0-9.04482" @@ -23,68 +25,26 @@ void CLuaPedDefs::LoadFunctions() {"createPed", CreatePed}, {"detonateSatchels", DetonateSatchels}, {"killPed", KillPed}, - {"resetPedVoice", ArgumentParser}, - {"getPedVoice", GetPedVoice}, + {"updateElementRpHAnim", ArgumentParser}, + {"addPedClothes", AddPedClothes}, + {"removePedClothes", RemovePedClothes}, + {"warpPedIntoVehicle", WarpPedIntoVehicle}, + {"removePedFromVehicle", RemovePedFromVehicle}, + {"givePedWeapon", GivePedWeapon}, + {"setPedVoice", SetPedVoice}, - {"getPedRotation", GetPedRotation}, - {"canPedBeKnockedOffBike", CanPedBeKnockedOffBike}, - {"getPedContactElement", GetPedContactElement}, - {"isPedInVehicle", IsPedInVehicle}, - {"doesPedHaveJetPack", DoesPedHaveJetPack}, - {"isPedWearingJetpack", DoesPedHaveJetPack}, // introduced in 1.5.5-9.13846 - {"isPedOnGround", IsPedOnGround}, - {"getPedTask", GetPedTask}, - {"getPedSimplestTask", GetPedSimplestTask}, - {"isPedDoingTask", IsPedDoingTask}, - {"getPedTarget", GetPedTarget}, - {"getPedTargetStart", GetPedTargetStart}, - {"getPedTargetEnd", GetPedTargetEnd}, - {"getPedTargetCollision", GetPedTargetCollision}, - {"getPedWeaponSlot", GetPedWeaponSlot}, - {"getPedWeapon", GetPedWeapon}, - {"getPedAmmoInClip", GetPedAmmoInClip}, - {"getPedTotalAmmo", GetPedTotalAmmo}, - {"getPedOccupiedVehicle", GetPedOccupiedVehicle}, - {"getPedOccupiedVehicleSeat", GetPedOccupiedVehicleSeat}, - {"getPedArmor", GetPedArmor}, - {"isPedChoking", IsPedChoking}, - {"isPedDucked", IsPedDucked}, - {"getPedStat", GetPedStat}, - {"getPedBonePosition", GetPedBonePosition}, {"setElementBonePosition", ArgumentParser}, {"setElementBoneRotation", ArgumentParser}, - {"getElementBonePosition", ArgumentParser}, - {"getElementBoneRotation", ArgumentParser}, + {"setElementBoneQuaternion", ArgumentParser}, {"setElementBoneMatrix", ArgumentParser}, - {"getElementBoneMatrix", ArgumentParser}, - {"updateElementRpHAnim", ArgumentParser}, - {"getPedClothes", GetPedClothes}, - {"getPedControlState", GetPedControlState}, - {"getPedAnalogControlState", GetPedAnalogControlState}, - {"isPedDead", IsPedDead}, - - {"isPedDoingGangDriveby", IsPedDoingGangDriveby}, - {"getPedFightingStyle", GetPedFightingStyle}, - {"getPedAnimation", GetPedAnimation}, - {"getPedMoveState", GetPedMoveState}, - {"getPedWalkingStyle", GetPedMoveAnim}, - {"isPedHeadless", IsPedHeadless}, - {"isPedFrozen", IsPedFrozen}, - {"isPedFootBloodEnabled", IsPedFootBloodEnabled}, - {"getPedCameraRotation", GetPedCameraRotation}, - {"getPedOxygenLevel", GetPedOxygenLevel}, - {"isPedBleeding", ArgumentParser}, - - {"setPedWeaponSlot", SetPedWeaponSlot}, {"setPedRotation", SetPedRotation}, + {"setPedWeaponSlot", SetPedWeaponSlot}, {"setPedCanBeKnockedOffBike", SetPedCanBeKnockedOffBike}, {"setPedAnimation", SetPedAnimation}, {"setPedAnimationProgress", SetPedAnimationProgress}, {"setPedAnimationSpeed", SetPedAnimationSpeed}, {"setPedWalkingStyle", SetPedMoveAnim}, - {"addPedClothes", AddPedClothes}, - {"removePedClothes", RemovePedClothes}, {"setPedControlState", SetPedControlState}, {"setPedAnalogControlState", SetPedAnalogControlState}, {"setPedDoingGangDriveby", SetPedDoingGangDriveby}, @@ -96,15 +56,65 @@ void CLuaPedDefs::LoadFunctions() {"setPedCameraRotation", SetPedCameraRotation}, {"setPedAimTarget", SetPedAimTarget}, {"setPedStat", SetPedStat}, - {"warpPedIntoVehicle", WarpPedIntoVehicle}, - {"removePedFromVehicle", RemovePedFromVehicle}, {"setPedOxygenLevel", SetPedOxygenLevel}, {"setPedArmor", ArgumentParser}, - {"givePedWeapon", GivePedWeapon}, - {"isPedReloadingWeapon", IsPedReloadingWeapon}, {"setPedEnterVehicle", ArgumentParser}, {"setPedExitVehicle", ArgumentParser}, {"setPedBleeding", ArgumentParser}, + + {"getPedVoice", GetPedVoice}, + {"getElementBonePosition", ArgumentParser}, + {"getElementBoneRotation", ArgumentParser}, + {"getElementBoneQuaternion", ArgumentParser}, + {"getElementBoneMatrix", ArgumentParser}, + {"getPedRotation", GetPedRotation}, + {"getPedWeaponSlot", GetPedWeaponSlot}, + {"canPedBeKnockedOffBike", CanPedBeKnockedOffBike}, + {"getPedAnimation", GetPedAnimation}, + {"getPedAnimationProgress", ArgumentParser}, + {"getPedAnimationSpeed", ArgumentParser}, + {"getPedAnimationLength", ArgumentParser}, + {"getPedWalkingStyle", GetPedMoveAnim}, + {"getPedControlState", GetPedControlState}, + {"getPedAnalogControlState", GetPedAnalogControlState}, + {"isPedDoingGangDriveby", IsPedDoingGangDriveby}, + {"getPedFightingStyle", GetPedFightingStyle}, + + {"isPedHeadless", IsPedHeadless}, + {"isPedFrozen", IsPedFrozen}, + {"isPedFootBloodEnabled", IsPedFootBloodEnabled}, + {"getPedCameraRotation", GetPedCameraRotation}, + + {"getPedStat", GetPedStat}, + {"getPedOxygenLevel", GetPedOxygenLevel}, + {"getPedArmor", GetPedArmor}, + {"isPedBleeding", ArgumentParser}, + + {"getPedContactElement", GetPedContactElement}, + {"getPedTask", GetPedTask}, + {"getPedSimplestTask", GetPedSimplestTask}, + {"getPedTarget", GetPedTarget}, + {"getPedTargetStart", GetPedTargetStart}, + {"getPedTargetEnd", GetPedTargetEnd}, + {"getPedTargetCollision", GetPedTargetCollision}, + {"getPedWeapon", GetPedWeapon}, + {"getPedAmmoInClip", GetPedAmmoInClip}, + {"getPedTotalAmmo", GetPedTotalAmmo}, + {"getPedOccupiedVehicle", GetPedOccupiedVehicle}, + {"getPedOccupiedVehicleSeat", GetPedOccupiedVehicleSeat}, + {"getPedBonePosition", GetPedBonePosition}, + {"getPedClothes", GetPedClothes}, + {"getPedMoveState", GetPedMoveState}, + + {"doesPedHaveJetPack", DoesPedHaveJetPack}, + {"isPedInVehicle", IsPedInVehicle}, + {"isPedWearingJetpack", DoesPedHaveJetPack}, + {"isPedOnGround", IsPedOnGround}, + {"isPedDoingTask", IsPedDoingTask}, + {"isPedChoking", IsPedChoking}, + {"isPedDucked", IsPedDucked}, + {"isPedDead", IsPedDead}, + {"isPedReloadingWeapon", IsPedReloadingWeapon}, }; // Add functions @@ -998,43 +1008,77 @@ int CLuaPedDefs::CanPedBeKnockedOffBike(lua_State* luaVM) return 1; } -bool CLuaPedDefs::SetElementBonePosition(lua_State* const luaVM, CClientPed* entity, std::int32_t boneId, CVector position) +bool CLuaPedDefs::SetElementBonePosition(lua_State* const luaVM, CClientPed* entity, std::uint32_t boneId, CVector position) +{ + CEntity* theEntity = entity->GetGameEntity(); + if (!theEntity) + return false; + return theEntity->SetBonePosition(static_cast(boneId), position); +} + +bool CLuaPedDefs::SetElementBoneRotation(lua_State* const luaVM, CClientPed* entity, std::uint32_t boneId, float yaw, float pitch, float roll) { + if (boneId > BONE_RIGHTFOOT) + throw LuaFunctionError("Invalid bone ID", false); + CEntity* theEntity = entity->GetGameEntity(); - return theEntity ? theEntity->SetBonePosition(static_cast(boneId), position) : false; + if (!theEntity) + return false; + return theEntity->SetBoneRotation(static_cast(boneId), yaw, pitch, roll); } -bool CLuaPedDefs::SetElementBoneRotation(lua_State* const luaVM, CClientPed* entity, std::int32_t boneId, float yaw, float pitch, float roll) +bool CLuaPedDefs::SetElementBoneQuaternion(lua_State* const luaVM, CClientPed* entity, std::uint32_t boneId, float x, float y, float z, float w) { + if (boneId > BONE_RIGHTFOOT) + throw LuaFunctionError("Invalid bone ID", false); + CEntity* theEntity = entity->GetGameEntity(); - return theEntity ? theEntity->SetBoneRotation(static_cast(boneId), yaw, pitch, roll) : false; + return theEntity ? theEntity->SetBoneRotationQuat(static_cast(boneId), x, y, z, w) : false; } -std::variant> CLuaPedDefs::GetElementBonePosition(lua_State* const luaVM, CClientPed* entity, std::int32_t boneId) +std::variant> CLuaPedDefs::GetElementBonePosition(lua_State* const luaVM, CClientPed* entity, std::uint32_t boneId) { CEntity* theEntity = entity->GetGameEntity(); CVector position; - if (theEntity && theEntity->GetBonePosition(static_cast(boneId), position)) - return std::make_tuple(position.fX, position.fY, position.fZ); - return false; + if (!theEntity || !theEntity->GetBonePosition(static_cast(boneId), position)) + return false; + + return std::make_tuple(position.fX, position.fY, position.fZ); } -std::variant> CLuaPedDefs::GetElementBoneRotation(lua_State* const luaVM, CClientPed* entity, std::int32_t boneId) +std::variant> CLuaPedDefs::GetElementBoneRotation(lua_State* const luaVM, CClientPed* entity, std::uint32_t boneId) { - float yaw = 0.0f, pitch = 0.0f, roll = 0.0f; + if (boneId > BONE_RIGHTFOOT) + throw LuaFunctionError("Invalid bone ID", false); + + float yaw = 0.0f, pitch = 0.0f, roll = 0.0f; CEntity* theEntity = entity->GetGameEntity(); - if (theEntity && theEntity->GetBoneRotation(static_cast(boneId), yaw, pitch, roll)) - return std::make_tuple(yaw, pitch, roll); - return false; + if (!theEntity || !theEntity->GetBoneRotation(static_cast(boneId), yaw, pitch, roll)) + return false; + + return std::make_tuple(yaw, pitch, roll); } -bool CLuaPedDefs::SetElementBoneMatrix(lua_State* const luaVM, CClientPed* entity, std::int32_t boneId, CMatrix boneMatrix) +std::variant> CLuaPedDefs::GetElementBoneQuaternion(lua_State* const luaVM, CClientPed* entity, std::uint32_t boneId) +{ + if (boneId > BONE_RIGHTFOOT) + throw LuaFunctionError("Invalid bone ID", false); + + float x = 0.0f, y = 0.0f, z = 0.0f, w = 0.0f; + CEntity* theEntity = entity->GetGameEntity(); + if (!theEntity || !theEntity->GetBoneRotationQuat(static_cast(boneId), x, y, z, w)) + return false; + + return std::make_tuple(x, y, z, w); +} + +bool CLuaPedDefs::SetElementBoneMatrix(lua_State* const luaVM, CClientPed* entity, std::uint32_t boneId, CMatrix boneMatrix) { CEntity* theEntity = entity->GetGameEntity(); return theEntity ? theEntity->SetBoneMatrix(static_cast(boneId), boneMatrix) : false; } -std::variant, 4>> CLuaPedDefs::GetElementBoneMatrix(lua_State* const luaVM, CClientPed* entity, std::int32_t boneId) +std::variant, 4>> CLuaPedDefs::GetElementBoneMatrix(lua_State* const luaVM, CClientPed* entity, std::uint32_t boneId) { CEntity* theEntity = entity->GetGameEntity(); if (theEntity) @@ -2243,6 +2287,66 @@ int CLuaPedDefs::SetPedAnimationProgress(lua_State* luaVM) return 1; } +float CLuaPedDefs::GetPedAnimationProgress(CClientPed* ped) +{ + CTask* currentTask = ped->GetTaskManager()->GetActiveTask(); + std::int32_t type = currentTask->GetTaskType(); + + // check if animation (task type is 401) + if (type != 401) + return -1.0f; + + auto* animation = dynamic_cast(currentTask); + if (!animation) + return -1.0f; + + auto animAssociation = g_pGame->GetAnimManager()->RpAnimBlendClumpGetAssociation(ped->GetClump(), animation->GetAnimName()); + if (!animAssociation) + return -1.0f; + + return animAssociation->GetCurrentProgress() / animAssociation->GetLength(); +} + +float CLuaPedDefs::GetPedAnimationSpeed(CClientPed* ped) +{ + CTask* currentTask = ped->GetTaskManager()->GetActiveTask(); + std::int32_t type = currentTask->GetTaskType(); + + // check if animation (task type is 401) + if (type != 401) + return -1.0f; + + auto* animation = dynamic_cast(currentTask); + if (!animation) + return -1.0f; + + auto animAssociation = g_pGame->GetAnimManager()->RpAnimBlendClumpGetAssociation(ped->GetClump(), animation->GetAnimName()); + if (!animAssociation) + return -1.0f; + + return animAssociation->GetCurrentSpeed(); +} + +float CLuaPedDefs::GetPedAnimationLength(CClientPed* ped) +{ + CTask* currentTask = ped->GetTaskManager()->GetActiveTask(); + std::int32_t type = currentTask->GetTaskType(); + + // check if animation (task type is 401) + if (type != 401) + return -1.0f; + + auto* animation = dynamic_cast(currentTask); + if (!animation) + return -1.0f; + + auto animAssociation = g_pGame->GetAnimManager()->RpAnimBlendClumpGetAssociation(ped->GetClump(), animation->GetAnimName()); + if (!animAssociation) + return -1.0f; + + return animAssociation->GetLength(); +} + int CLuaPedDefs::SetPedAnimationSpeed(lua_State* luaVM) { CClientEntity* pEntity; diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.h b/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.h index 1758011f70..d97a484d8e 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.h +++ b/Client/mods/deathmatch/logic/luadefs/CLuaPedDefs.h @@ -50,15 +50,17 @@ class CLuaPedDefs : public CLuaDefs LUA_DECLARE(GetPedContactElement); LUA_DECLARE(GetPedRotation); LUA_DECLARE(CanPedBeKnockedOffBike); - static bool SetElementBonePosition(lua_State* const luaVM, CClientPed* entity, std::int32_t boneId, CVector position); - static bool SetElementBoneRotation(lua_State* const luaVM, CClientPed* entity, std::int32_t boneId, float yaw, float pitch, float roll); - static std::variant> GetElementBonePosition(lua_State* const luaVM, CClientPed* entity, std::int32_t boneId); + static bool SetElementBonePosition(lua_State* const luaVM, CClientPed* entity, std::uint32_t boneId, CVector position); + static bool SetElementBoneRotation(lua_State* const luaVM, CClientPed* entity, std::uint32_t boneId, float yaw, float pitch, float roll); + static bool SetElementBoneQuaternion(lua_State* const luaVM, CClientPed* entity, std::uint32_t boneId, float x, float y, float z, float w); + static std::variant> GetElementBonePosition(lua_State* const luaVM, CClientPed* entity, std::uint32_t boneId); - static std::variant> GetElementBoneRotation(lua_State* const luaVM, CClientPed* entity, std::int32_t boneId); + static std::variant> GetElementBoneRotation(lua_State* const luaVM, CClientPed* entity, std::uint32_t boneId); + static std::variant> GetElementBoneQuaternion(lua_State* const luaVM, CClientPed* entity, std::uint32_t boneId); - static bool SetElementBoneMatrix(lua_State* const luaVM, CClientPed* entity, std::int32_t boneId, CMatrix boneMatrix); + static bool SetElementBoneMatrix(lua_State* const luaVM, CClientPed* entity, std::uint32_t boneId, CMatrix boneMatrix); - static std::variant, 4>> GetElementBoneMatrix(lua_State* const luaVM, CClientPed* entity, std::int32_t boneId); + static std::variant, 4>> GetElementBoneMatrix(lua_State* const luaVM, CClientPed* entity, std::uint32_t boneId); static bool UpdateElementRpHAnim(lua_State* const luaVM, CClientEntity* entity); LUA_DECLARE_OOP(GetPedBonePosition); @@ -69,6 +71,9 @@ class CLuaPedDefs : public CLuaDefs LUA_DECLARE(IsPedDoingGangDriveby); LUA_DECLARE(GetPedFightingStyle); LUA_DECLARE(GetPedAnimation); + static float GetPedAnimationProgress(CClientPed* ped); + static float GetPedAnimationSpeed(CClientPed* ped); + static float GetPedAnimationLength(CClientPed* ped); LUA_DECLARE(GetPedMoveState); LUA_DECLARE(GetPedMoveAnim); LUA_DECLARE(IsPedHeadless); diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaPlayerDefs.cpp b/Client/mods/deathmatch/logic/luadefs/CLuaPlayerDefs.cpp index 757a4d5419..e276a3ddf7 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaPlayerDefs.cpp +++ b/Client/mods/deathmatch/logic/luadefs/CLuaPlayerDefs.cpp @@ -29,6 +29,7 @@ void CLuaPlayerDefs::LoadFunctions() {"getPlayerMoney", GetPlayerMoney}, {"getPlayerWantedLevel", GetPlayerWantedLevel}, {"getPlayerScriptDebugLevel", ArgumentParser}, + {"isPlayerCrosshairVisible", ArgumentParser}, // Player set funcs {"showPlayerHudComponent", ShowPlayerHudComponent}, @@ -91,6 +92,7 @@ void CLuaPlayerDefs::AddClass(lua_State* luaVM) lua_classfunction(luaVM, "getScriptDebugLevel", "getPlayerScriptDebugLevel"); lua_classfunction(luaVM, "isNametagShowing", "isPlayerNametagShowing"); + lua_classfunction(luaVM, "isCrosshairVisible", "isPlayerCrosshairVisible"); lua_classvariable(luaVM, "ping", NULL, "getPlayerPing"); lua_classvariable(luaVM, "name", NULL, "getPlayerName"); @@ -98,6 +100,7 @@ void CLuaPlayerDefs::AddClass(lua_State* luaVM) lua_classvariable(luaVM, "scriptDebugLevel", nullptr, "getPlayerScriptDebugLevel"); lua_classvariable(luaVM, "nametagText", "setPlayerNametagText", "getPlayerNametagText"); lua_classvariable(luaVM, "nametagShowing", "setPlayerNametagShowing", "isPlayerNametagShowing"); + lua_classvariable(luaVM, "crosshairVisible", nullptr, "isPlayerCrosshairVisible"); lua_registerclass(luaVM, "Player", "Ped"); } @@ -636,3 +639,8 @@ unsigned char CLuaPlayerDefs::GetPlayerMapOpacity() int iMapOpacity = g_pCore->GetCVars()->GetValue("mapalpha"); return static_cast(Clamp(0, iMapOpacity, 255)); } + +bool CLuaPlayerDefs::IsPlayerCrosshairVisible() +{ + return g_pGame->GetHud()->IsCrosshairVisible(); +} diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaPlayerDefs.h b/Client/mods/deathmatch/logic/luadefs/CLuaPlayerDefs.h index 918acec6b6..1a2895ed3d 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaPlayerDefs.h +++ b/Client/mods/deathmatch/logic/luadefs/CLuaPlayerDefs.h @@ -30,6 +30,7 @@ class CLuaPlayerDefs : public CLuaDefs LUA_DECLARE(GetPlayerMoney); LUA_DECLARE(GetPlayerWantedLevel); static std::uint8_t GetPlayerScriptDebugLevel() noexcept; + static bool IsPlayerCrosshairVisible(); // Player set LUA_DECLARE(ShowPlayerHudComponent); diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaTimerDefs.cpp b/Client/mods/deathmatch/logic/luadefs/CLuaTimerDefs.cpp index 401abcfd96..e0c8a96ba0 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaTimerDefs.cpp +++ b/Client/mods/deathmatch/logic/luadefs/CLuaTimerDefs.cpp @@ -10,12 +10,14 @@ *****************************************************************************/ #include "StdInc.h" +#include void CLuaTimerDefs::LoadFunctions() { constexpr static const std::pair functions[]{ - {"setTimer", SetTimer}, {"killTimer", KillTimer}, {"resetTimer", ResetTimer}, - {"getTimers", GetTimers}, {"isTimer", IsTimer}, {"getTimerDetails", GetTimerDetails}, + {"setTimer", SetTimer}, {"killTimer", KillTimer}, {"resetTimer", ResetTimer}, + {"setTimerPaused", ArgumentParser},{"isTimerPaused", ArgumentParser}, + {"getTimers", GetTimers}, {"isTimer", IsTimer}, {"getTimerDetails", GetTimerDetails}, }; // Add functions @@ -31,10 +33,10 @@ void CLuaTimerDefs::AddClass(lua_State* luaVM) lua_classfunction(luaVM, "destroy", "killTimer"); lua_classfunction(luaVM, "reset", "resetTimer"); lua_classfunction(luaVM, "isValid", "isTimer"); - lua_classfunction(luaVM, "getDetails", "getTimerDetails"); lua_classvariable(luaVM, "valid", NULL, "isTimer"); + lua_classvariable(luaVM, "paused", "setTimerPaused", "isTimerPaused"); lua_registerclass(luaVM, "Timer"); } @@ -111,6 +113,22 @@ int CLuaTimerDefs::KillTimer(lua_State* luaVM) return 1; } +bool CLuaTimerDefs::IsTimerPaused(CLuaTimer* timer) noexcept +{ + return timer->IsPaused(); +} + +bool CLuaTimerDefs::SetTimerPaused(lua_State* luaVM, CLuaTimer* timer, bool paused) +{ + // bool setTimerPaused ( timer theTimer, bool paused ) + CLuaMain* luaMain = m_pLuaManager->GetVirtualMachine(luaVM); + if (!luaMain) + return false; + + luaMain->GetTimerManager()->SetTimerPaused(timer, paused); + return true; +} + int CLuaTimerDefs::ResetTimer(lua_State* luaVM) { // bool resetTimer ( timer theTimer ) diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaTimerDefs.h b/Client/mods/deathmatch/logic/luadefs/CLuaTimerDefs.h index 671a329b28..db6cac48a9 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaTimerDefs.h +++ b/Client/mods/deathmatch/logic/luadefs/CLuaTimerDefs.h @@ -24,4 +24,6 @@ class CLuaTimerDefs : public CLuaDefs LUA_DECLARE(GetTimers); LUA_DECLARE(IsTimer); LUA_DECLARE(GetTimerDetails); + static bool IsTimerPaused(CLuaTimer* timer) noexcept; + static bool SetTimerPaused(lua_State* luaVM, CLuaTimer* timer, bool paused); }; diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.cpp b/Client/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.cpp index b35bfee24b..6ac42bf386 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.cpp +++ b/Client/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.cpp @@ -155,6 +155,7 @@ void CLuaVehicleDefs::LoadFunctions() {"setVehicleVariant", ArgumentParser}, {"setVehicleWheelScale", ArgumentParser}, {"setVehicleModelWheelSize", ArgumentParser}, + {"spawnVehicleFlyingComponent", ArgumentParser}, }; // Add functions @@ -301,6 +302,8 @@ void CLuaVehicleDefs::AddClass(lua_State* luaVM) lua_classfunction(luaVM, "addUpgrade", "addVehicleUpgrade"); lua_classfunction(luaVM, "removeUpgrade", "removeVehicleUpgrade"); + lua_classfunction(luaVM, "spawnFlyingComponent", "spawnVehicleFlyingComponent"); + lua_classvariable(luaVM, "locked", "setVehicleLocked", "isVehicleLocked"); lua_classvariable(luaVM, "controller", NULL, "getVehicleController"); lua_classvariable(luaVM, "occupants", NULL, "getVehicleOccupants"); @@ -4233,7 +4236,7 @@ bool CLuaVehicleDefs::BlowVehicle(CClientEntity* entity, std::optional wit { return CStaticFunctionDefinitions::BlowVehicle(*entity, withExplosion); } - + std::variant, 4>> CLuaVehicleDefs::GetVehicleEntryPoints(CClientVehicle* vehicle) { auto entryPointVectors = OOP_GetVehicleEntryPoints(vehicle); @@ -4273,3 +4276,67 @@ std::variant> CLuaVehicleDefs::OOP_GetVehicleEntryP return entryPoints; } + +bool CLuaVehicleDefs::SpawnVehicleFlyingComponent(CClientVehicle* const vehicle, std::uint8_t nodeIndex, std::optional componentCollisionType, + std::optional removalTime) +{ + auto partNodeIndex = static_cast(nodeIndex); + auto collisionType = componentCollisionType.has_value() ? static_cast(componentCollisionType.value()) + : eCarComponentCollisionTypes::COL_NODE_PANEL; + + if (nodeIndex < 1 || partNodeIndex >= eCarNodes::NUM_NODES) + throw std::invalid_argument("Invalid component index"); + + if (collisionType >= eCarComponentCollisionTypes::COL_NODES_NUM) + throw std::invalid_argument("Invalid collision type index"); + + if (!componentCollisionType.has_value()) + { + switch (partNodeIndex) + { + case eCarNodes::WHEEL_RF: + case eCarNodes::WHEEL_RB: + case eCarNodes::WHEEL_LF: + case eCarNodes::WHEEL_LB: + { + collisionType = eCarComponentCollisionTypes::COL_NODE_WHEEL; + break; + } + case eCarNodes::DOOR_RF: + case eCarNodes::DOOR_RR: + case eCarNodes::DOOR_LF: + case eCarNodes::DOOR_LR: + { + collisionType = eCarComponentCollisionTypes::COL_NODE_DOOR; + break; + } + case eCarNodes::BUMP_FRONT: + case eCarNodes::BUMP_REAR: + case eCarNodes::WHEEL_LM: + case eCarNodes::WHEEL_RM: + { + collisionType = eCarComponentCollisionTypes::COL_NODE_BUMPER; + break; + } + case eCarNodes::BOOT: + case eCarNodes::CHASSIS: + { + collisionType = eCarComponentCollisionTypes::COL_NODE_BOOT; + break; + } + case eCarNodes::BONNET: + case eCarNodes::WINDSCREEN: + { + collisionType = eCarComponentCollisionTypes::COL_NODE_BONNET; + break; + } + default: + { + collisionType = eCarComponentCollisionTypes::COL_NODE_PANEL; + break; + } + } + } + + return vehicle->SpawnFlyingComponent(partNodeIndex, collisionType, removalTime.value_or(-1)); +} diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.h b/Client/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.h index 5c2e908d58..28c2f5e372 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.h +++ b/Client/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.h @@ -179,4 +179,6 @@ class CLuaVehicleDefs : public CLuaDefs LUA_DECLARE(SetVehicleComponentVisible); LUA_DECLARE(GetVehicleComponentVisible); LUA_DECLARE(GetVehicleComponents); + + static bool SpawnVehicleFlyingComponent(CClientVehicle* const vehicle, std::uint8_t nodeIndex, std::optional componentCollisionType, std::optional removalTime); }; diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaWorldDefs.cpp b/Client/mods/deathmatch/logic/luadefs/CLuaWorldDefs.cpp index 7f8af634e7..382c2c7488 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaWorldDefs.cpp +++ b/Client/mods/deathmatch/logic/luadefs/CLuaWorldDefs.cpp @@ -105,6 +105,7 @@ void CLuaWorldDefs::LoadFunctions() {"restoreAllWorldModels", RestoreWorldBuildings}, {"restoreWorldModel", RestoreWorldBuilding}, {"setTimeFrozen", ArgumentParser}, + {"setVolumetricShadowsEnabled", ArgumentParser}, // World create funcs {"createSWATRope", CreateSWATRope}, @@ -128,14 +129,17 @@ void CLuaWorldDefs::LoadFunctions() {"resetBlurLevel", ResetBlurLevel}, {"resetWorldProperty", ArgumentParserWarn}, {"resetTimeFrozen", ArgumentParser}, - + {"resetVolumetricShadows", ArgumentParser}, + {"resetWorldProperties", ArgumentParser}, + // World check funcs {"areTrafficLightsLocked", AreTrafficLightsLocked}, {"isPedTargetingMarkerEnabled", IsPedTargetingMarkerEnabled}, {"isLineOfSightClear", IsLineOfSightClear}, {"isWorldSpecialPropertyEnabled", ArgumentParserWarn}, {"isGarageOpen", IsGarageOpen}, - {"isTimeFrozen", ArgumentParser}}; + {"isTimeFrozen", ArgumentParser}, + {"isVolumetricShadowsEnabled", ArgumentParser}}; // Add functions for (const auto& [name, func] : functions) @@ -2253,3 +2257,24 @@ bool CLuaWorldDefs::ResetTimeFrozen() noexcept { return g_pGame->GetClock()->ResetTimeFrozen(); } + +bool CLuaWorldDefs::SetVolumetricShadowsEnabled(bool enable) noexcept +{ + g_pGame->GetSettings()->SetVolumetricShadowsEnabled(enable); + return true; +} + +bool CLuaWorldDefs::IsVolumetricShadowsEnabled() noexcept +{ + return g_pGame->GetSettings()->IsVolumetricShadowsEnabled(); +} + +bool CLuaWorldDefs::ResetVolumetricShadows() noexcept +{ + return g_pGame->GetSettings()->ResetVolumetricShadows(); +} + +void CLuaWorldDefs::ResetWorldProperties(std::optional resetSpecialWorldProperties, std::optional resetWorldProperties, std::optional resetWeatherProperties, std::optional resetLODs, std::optional resetSounds) noexcept +{ + g_pClientGame->ResetWorldProperties(ResetWorldPropsInfo{resetSpecialWorldProperties.value_or(true), resetWorldProperties.value_or(true), resetWeatherProperties.value_or(true), resetLODs.value_or(true), resetSounds.value_or(true)}); +} diff --git a/Client/mods/deathmatch/logic/luadefs/CLuaWorldDefs.h b/Client/mods/deathmatch/logic/luadefs/CLuaWorldDefs.h index 6f79c9081a..ac38251dc7 100644 --- a/Client/mods/deathmatch/logic/luadefs/CLuaWorldDefs.h +++ b/Client/mods/deathmatch/logic/luadefs/CLuaWorldDefs.h @@ -134,5 +134,12 @@ class CLuaWorldDefs : public CLuaDefs static bool SetTimeFrozen(bool value) noexcept; static bool IsTimeFrozen() noexcept; static bool ResetTimeFrozen() noexcept; - }; + + static bool SetVolumetricShadowsEnabled(bool enable) noexcept; + static bool IsVolumetricShadowsEnabled() noexcept; + static bool ResetVolumetricShadows() noexcept; + + static void ResetWorldProperties(std::optional resetSpecialWorldProperties, std::optional resetWorldProperties, std::optional resetWeatherProperties, std::optional resetLODs, std::optional resetSounds) noexcept; + +}; diff --git a/Client/mods/deathmatch/logic/rpc/CObjectRPCs.cpp b/Client/mods/deathmatch/logic/rpc/CObjectRPCs.cpp index 5ef2bb66b1..40984f5892 100644 --- a/Client/mods/deathmatch/logic/rpc/CObjectRPCs.cpp +++ b/Client/mods/deathmatch/logic/rpc/CObjectRPCs.cpp @@ -22,6 +22,8 @@ void CObjectRPCs::LoadFunctions() AddHandler(SET_OBJECT_VISIBLE_IN_ALL_DIMENSIONS, SetObjectVisibleInAllDimensions, "SetObjectVisibleInAllDimensions"); AddHandler(SET_OBJECT_BREAKABLE, SetObjectBreakable, "SetObjectBreakable"); AddHandler(BREAK_OBJECT, BreakObject, "BreakObject"); + AddHandler(RESPAWN_OBJECT, RespawnObject, "RespawnObject"); + AddHandler(TOGGLE_OBJECT_RESPAWN, ToggleObjectRespawn, "ToggleObjectRespawn"); } void CObjectRPCs::DestroyAllObjects(NetBitStreamInterface& bitStream) @@ -130,8 +132,24 @@ void CObjectRPCs::SetObjectBreakable(CClientEntity* pSource, NetBitStreamInterfa void CObjectRPCs::BreakObject(CClientEntity* pSource, NetBitStreamInterface& bitStream) { - auto pObject = static_cast(m_pObjectManager->Get(pSource->GetID())); + auto* pObject = static_cast(m_pObjectManager->Get(pSource->GetID())); - if (pObject != nullptr) + if (pObject) pObject->Break(); } + +void CObjectRPCs::RespawnObject(CClientEntity* pSource, NetBitStreamInterface& bitStream) +{ + auto* pObject = static_cast(m_pObjectManager->Get(pSource->GetID())); + + if (pObject) + g_pClientGame->GetObjectRespawner()->Respawn(pObject); +} + +void CObjectRPCs::ToggleObjectRespawn(CClientEntity* pSource, NetBitStreamInterface& bitStream) +{ + auto* pObject = static_cast(m_pObjectManager->Get(pSource->GetID())); + + if (pObject) + pObject->SetRespawnEnabled(bitStream.ReadBit()); +} diff --git a/Client/mods/deathmatch/logic/rpc/CObjectRPCs.h b/Client/mods/deathmatch/logic/rpc/CObjectRPCs.h index 8aa427c14f..5a342b743b 100644 --- a/Client/mods/deathmatch/logic/rpc/CObjectRPCs.h +++ b/Client/mods/deathmatch/logic/rpc/CObjectRPCs.h @@ -27,4 +27,6 @@ class CObjectRPCs : public CRPCFunctions DECLARE_ELEMENT_RPC(SetObjectVisibleInAllDimensions); DECLARE_ELEMENT_RPC(SetObjectBreakable); DECLARE_ELEMENT_RPC(BreakObject); + DECLARE_ELEMENT_RPC(RespawnObject); + DECLARE_ELEMENT_RPC(ToggleObjectRespawn); }; diff --git a/Client/mods/deathmatch/logic/rpc/CVehicleRPCs.cpp b/Client/mods/deathmatch/logic/rpc/CVehicleRPCs.cpp index be586965db..7915c2c7d4 100644 --- a/Client/mods/deathmatch/logic/rpc/CVehicleRPCs.cpp +++ b/Client/mods/deathmatch/logic/rpc/CVehicleRPCs.cpp @@ -52,6 +52,7 @@ void CVehicleRPCs::LoadFunctions() AddHandler(REMOVE_VEHICLE_SIRENS, RemoveVehicleSirens, "removeVehicleSirens"); AddHandler(SET_VEHICLE_SIRENS, SetVehicleSirens, "setVehicleSirens"); AddHandler(SET_VEHICLE_PLATE_TEXT, SetVehiclePlateText, "setVehiclePlateText"); + AddHandler(SPAWN_VEHICLE_FLYING_COMPONENT, SpawnVehicleFlyingComponent, "spawnVehicleFlyingComponent"); } void CVehicleRPCs::DestroyAllVehicles(NetBitStreamInterface& bitStream) @@ -653,3 +654,16 @@ void CVehicleRPCs::SetVehiclePlateText(CClientEntity* pSourceEntity, NetBitStrea } } } + +void CVehicleRPCs::SpawnVehicleFlyingComponent(CClientEntity* const sourceEntity, NetBitStreamInterface& bitStream) +{ + CClientVehicle* vehicle = m_pVehicleManager->Get(sourceEntity->GetID()); + if (!vehicle) + return; + + std::uint8_t nodeIndex, collisionType; + std::int32_t removalTime; + + if (bitStream.Read(nodeIndex) && bitStream.Read(collisionType) && bitStream.Read(removalTime)) + vehicle->SpawnFlyingComponent(static_cast(nodeIndex), static_cast(collisionType), removalTime); +} diff --git a/Client/mods/deathmatch/logic/rpc/CVehicleRPCs.h b/Client/mods/deathmatch/logic/rpc/CVehicleRPCs.h index e63d609fdf..6d4e9f5d19 100644 --- a/Client/mods/deathmatch/logic/rpc/CVehicleRPCs.h +++ b/Client/mods/deathmatch/logic/rpc/CVehicleRPCs.h @@ -57,4 +57,5 @@ class CVehicleRPCs : public CRPCFunctions DECLARE_ELEMENT_RPC(RemoveVehicleSirens); DECLARE_ELEMENT_RPC(SetVehicleSirens); DECLARE_ELEMENT_RPC(SetVehiclePlateText); + DECLARE_ELEMENT_RPC(SpawnVehicleFlyingComponent); }; diff --git a/Client/mods/deathmatch/logic/rpc/CWorldRPCs.cpp b/Client/mods/deathmatch/logic/rpc/CWorldRPCs.cpp index e4c2d93e4b..d92ba4788b 100644 --- a/Client/mods/deathmatch/logic/rpc/CWorldRPCs.cpp +++ b/Client/mods/deathmatch/logic/rpc/CWorldRPCs.cpp @@ -71,6 +71,8 @@ void CWorldRPCs::LoadFunctions() AddHandler(RESET_MOON_SIZE, ResetMoonSize, "ResetMoonSize"); AddHandler(SET_WORLD_SPECIAL_PROPERTY, SetWorldSpecialPropertyEnabled, "SetWorldSpecialPropertyEnabled"); + + AddHandler(RESET_WORLD_PROPERTIES, ResetWorldProperties, "ResetWorldProperties"); } void CWorldRPCs::SetTime(NetBitStreamInterface& bitStream) @@ -643,3 +645,14 @@ void CWorldRPCs::SetWorldSpecialPropertyEnabled(NetBitStreamInterface& bitStream g_pClientGame->SetWorldSpecialProperty((WorldSpecialProperty)property, isEnabled); } } + +void CWorldRPCs::ResetWorldProperties(NetBitStreamInterface& bitStream) +{ + bool resetSpecialProperties = bitStream.ReadBit(); + bool resetWorldProperties = bitStream.ReadBit(); + bool resetWeatherProperties = bitStream.ReadBit(); + bool resetLODs = bitStream.ReadBit(); + bool resetSounds = bitStream.ReadBit(); + + g_pClientGame->ResetWorldProperties(ResetWorldPropsInfo{resetSpecialProperties, resetWorldProperties, resetWeatherProperties, resetLODs, resetSounds}); +} diff --git a/Client/mods/deathmatch/logic/rpc/CWorldRPCs.h b/Client/mods/deathmatch/logic/rpc/CWorldRPCs.h index 6572f82121..04c4ffa817 100644 --- a/Client/mods/deathmatch/logic/rpc/CWorldRPCs.h +++ b/Client/mods/deathmatch/logic/rpc/CWorldRPCs.h @@ -65,4 +65,5 @@ class CWorldRPCs : public CRPCFunctions DECLARE_RPC(ResetMoonSize); DECLARE_RPC(SetSyncIntervals); DECLARE_RPC(SetWorldSpecialPropertyEnabled); + DECLARE_RPC(ResetWorldProperties); }; diff --git a/Client/multiplayer_sa/CMultiplayerSA.cpp b/Client/multiplayer_sa/CMultiplayerSA.cpp index 28d5b1f551..1b21f79a23 100644 --- a/Client/multiplayer_sa/CMultiplayerSA.cpp +++ b/Client/multiplayer_sa/CMultiplayerSA.cpp @@ -1569,6 +1569,10 @@ void CMultiplayerSA::InitHooks() // Fix invisible vehicle windows when lights are on (#2936) MemPut(0x6E1425, 1); + // Allow alpha change for helicopter rotor (#523) + MemSet((void*)0x6C444B, 0x90, 6); + MemSet((void*)0x6C4453, 0x90, 0x68); + InitHooks_CrashFixHacks(); // Init our 1.3 hooks. diff --git a/Client/multiplayer_sa/CMultiplayerSA.h b/Client/multiplayer_sa/CMultiplayerSA.h index f725f37b63..802b9b56ea 100644 --- a/Client/multiplayer_sa/CMultiplayerSA.h +++ b/Client/multiplayer_sa/CMultiplayerSA.h @@ -268,6 +268,7 @@ class CMultiplayerSA : public CMultiplayer void SetRender3DStuffHandler(Render3DStuffHandler* pHandler); void SetPreRenderSkyHandler(PreRenderSkyHandler* pHandler); void SetRenderHeliLightHandler(RenderHeliLightHandler* pHandler); + void SetRenderEverythingBarRoadsHandler(RenderEverythingBarRoadsHandler* pHandler) override; void Reset(); diff --git a/Client/multiplayer_sa/CMultiplayerSA_Rendering.cpp b/Client/multiplayer_sa/CMultiplayerSA_Rendering.cpp index 03a27688d2..b346f25874 100644 --- a/Client/multiplayer_sa/CMultiplayerSA_Rendering.cpp +++ b/Client/multiplayer_sa/CMultiplayerSA_Rendering.cpp @@ -13,6 +13,7 @@ extern CCoreInterface* g_pCore; GameEntityRenderHandler* pGameEntityRenderHandler = nullptr; PreRenderSkyHandler* pPreRenderSkyHandlerHandler = nullptr; RenderHeliLightHandler* pRenderHeliLightHandler = nullptr; +RenderEverythingBarRoadsHandler* pRenderEverythingBarRoadsHandler = nullptr; #define VAR_CCullZones_NumMirrorAttributeZones 0x0C87AC4 // int #define VAR_CMirrors_d3dRestored 0x0C7C729 // uchar @@ -581,6 +582,17 @@ void CMultiplayerSA::SetRenderHeliLightHandler(RenderHeliLightHandler* pHandler) pRenderHeliLightHandler = pHandler; } +////////////////////////////////////////////////////////////////////////////////////////// +// +// CMultiplayerSA::SetRenderEverythingBarRoadsHandler +// +// +////////////////////////////////////////////////////////////////////////////////////////// +void CMultiplayerSA::SetRenderEverythingBarRoadsHandler(RenderEverythingBarRoadsHandler* pHandler) +{ + pRenderEverythingBarRoadsHandler = pHandler; +} + ////////////////////////////////////////////////////////////////////////////////////////// // // CMultiplayerSA::SetIsMinimizedAndNotConnected @@ -703,6 +715,30 @@ void _declspec(naked) HOOK_CVisibilityPlugins_RenderPedCB() } } +// Hook info +#define HOOKPOS_CRenderer_EverythingBarRoads 0x553C78 +#define HOOKSIZE_CRenderer_EverythingBarRoads 5 +DWORD RETURN_CRenderer_EverythingBarRoads = 0x553C7D; +DWORD DO_CRenderer_EverythingBarRoads = 0x7EE180; +void _declspec(naked) HOOK_CRenderer_EverythingBarRoads() +{ + _asm + { + pushad + } + + if (pRenderEverythingBarRoadsHandler) + pRenderEverythingBarRoadsHandler(); + + _asm + { + popad + call DO_CRenderer_EverythingBarRoads + jmp RETURN_CRenderer_EverythingBarRoads + + } +} + ////////////////////////////////////////////////////////////////////////////////////////// // // CMultiplayerSA::InitHooks_Rendering @@ -726,4 +762,5 @@ void CMultiplayerSA::InitHooks_Rendering() EZHookInstallChecked(CClouds_RenderSkyPolys); EZHookInstallChecked(RwCameraSetNearClipPlane); EZHookInstall(RenderEffects_HeliLight); + EZHookInstall(CRenderer_EverythingBarRoads); } diff --git a/Client/sdk/game/CAnimBlendAssociation.h b/Client/sdk/game/CAnimBlendAssociation.h index 8d3501027e..f99b8bc982 100644 --- a/Client/sdk/game/CAnimBlendAssociation.h +++ b/Client/sdk/game/CAnimBlendAssociation.h @@ -40,8 +40,10 @@ class CAnimBlendAssociation virtual float GetBlendAmount() = 0; virtual void SetBlendAmount(float fAmount) = 0; virtual void SetCurrentProgress(float fProgress) = 0; - virtual float GetCurrentSpeed() = 0; + virtual float GetCurrentProgress() const noexcept = 0; virtual void SetCurrentSpeed(float fSpeed) = 0; + virtual float GetCurrentSpeed() const noexcept = 0; + virtual float GetLength() const noexcept = 0; virtual void SetAnimID(short sAnimID) = 0; virtual void SetAnimGroup(short sAnimGroup) = 0; virtual void SetFlags(short sFlags) = 0; diff --git a/Client/sdk/game/CAnimBlendHierarchy.h b/Client/sdk/game/CAnimBlendHierarchy.h index 7780250968..42cd336554 100644 --- a/Client/sdk/game/CAnimBlendHierarchy.h +++ b/Client/sdk/game/CAnimBlendHierarchy.h @@ -27,6 +27,7 @@ class CAnimBlendHierarchy virtual void RemoveFromUncompressedCache() = 0; virtual void RemoveQuaternionFlips() = 0; virtual void CalculateTotalTime() = 0; + virtual float GetTotalTime() const noexcept = 0; virtual CAnimBlendSequenceSAInterface* GetSequence(DWORD dwIndex) = 0; virtual CAnimBlendSequenceSAInterface* GetSequences() = 0; virtual unsigned short GetNumSequences() = 0; diff --git a/Client/sdk/game/CCamera.h b/Client/sdk/game/CCamera.h index 7dc104e3c0..57ede01f01 100644 --- a/Client/sdk/game/CCamera.h +++ b/Client/sdk/game/CCamera.h @@ -146,4 +146,6 @@ class CCamera virtual void ShakeCamera(float radius, float x, float y, float z) noexcept = 0; virtual void ResetShakeCamera() noexcept = 0; + + virtual std::uint8_t GetTransitionState() = 0; }; diff --git a/Client/sdk/game/CDamageManager.h b/Client/sdk/game/CDamageManager.h index 81fda71267..9c4fcc2348 100644 --- a/Client/sdk/game/CDamageManager.h +++ b/Client/sdk/game/CDamageManager.h @@ -121,6 +121,49 @@ enum eLights MAX_LIGHTS // MUST BE 16 OR LESS }; +enum class eCarNodes +{ + NONE = 0, + CHASSIS, + WHEEL_RF, + WHEEL_RM, + WHEEL_RB, + WHEEL_LF, + WHEEL_LM, + WHEEL_LB, + DOOR_RF, + DOOR_RR, + DOOR_LF, + DOOR_LR, + BUMP_FRONT, + BUMP_REAR, + WING_RF, + WING_LF, + BONNET, + BOOT, + WINDSCREEN, + EXHAUST, + MISC_A, + MISC_B, + MISC_C, + MISC_D, + MISC_E, + + NUM_NODES +}; + +enum class eCarComponentCollisionTypes +{ + COL_NODE_BUMPER = 0, + COL_NODE_WHEEL, + COL_NODE_DOOR, + COL_NODE_BONNET, + COL_NODE_BOOT, + COL_NODE_PANEL, + + COL_NODES_NUM +}; + class CDamageManager { public: diff --git a/Client/sdk/game/CEntity.h b/Client/sdk/game/CEntity.h index 085d92ab0e..32b803d544 100644 --- a/Client/sdk/game/CEntity.h +++ b/Client/sdk/game/CEntity.h @@ -112,7 +112,9 @@ class CEntity virtual bool SetBoneMatrix(eBone boneId, const CMatrix& matrix) = 0; virtual bool GetBoneRotation(eBone boneId, float& yaw, float& pitch, float& roll) = 0; + virtual bool GetBoneRotationQuat(eBone boneId, float& x, float& y, float& z, float& w) = 0; virtual bool SetBoneRotation(eBone boneId, float yaw, float pitch, float roll) = 0; + virtual bool SetBoneRotationQuat(eBone boneId, float x, float y, float z, float w) = 0; virtual bool GetBonePosition(eBone boneId, CVector& position) = 0; virtual bool SetBonePosition(eBone boneId, const CVector& position) = 0; }; diff --git a/Client/sdk/game/CGame.h b/Client/sdk/game/CGame.h index d487b524fb..b3da8af6e3 100644 --- a/Client/sdk/game/CGame.h +++ b/Client/sdk/game/CGame.h @@ -68,6 +68,7 @@ class CWeather; class CWorld; class CIplStore; class CBuildingRemoval; +class CRenderer; enum eEntityType; enum ePedPieceTypes; @@ -149,6 +150,7 @@ class __declspec(novtable) CGame virtual CPointLights* GetPointLights() = 0; virtual CColStore* GetCollisionStore() = 0; virtual CBuildingRemoval* GetBuildingRemoval() = 0; + virtual CRenderer* GetRenderer() const noexcept = 0; virtual CWeaponInfo* GetWeaponInfo(eWeaponType weapon, eWeaponSkill skill = WEAPONSKILL_STD) = 0; virtual CModelInfo* GetModelInfo(DWORD dwModelID, bool bCanBeInvalid = false) = 0; diff --git a/Client/sdk/game/CHud.h b/Client/sdk/game/CHud.h index e26ef6e8a9..af37d4a4cd 100644 --- a/Client/sdk/game/CHud.h +++ b/Client/sdk/game/CHud.h @@ -41,4 +41,5 @@ class CHud virtual bool IsComponentVisible(eHudComponent component) = 0; virtual void AdjustComponents(float fAspectRatio) = 0; virtual void ResetComponentAdjustment() = 0; + virtual bool IsCrosshairVisible() = 0; }; diff --git a/Client/sdk/game/CModelInfo.h b/Client/sdk/game/CModelInfo.h index a1a9e14d4f..1938fe4f7e 100644 --- a/Client/sdk/game/CModelInfo.h +++ b/Client/sdk/game/CModelInfo.h @@ -60,6 +60,7 @@ enum class eModelInfoType : unsigned char VEHICLE = 6, PED = 7, LOD_ATOMIC = 8, + UNKNOWN = 9 }; enum eVehicleUpgradePosn diff --git a/Client/sdk/game/CPed.h b/Client/sdk/game/CPed.h index 4e91cdb8b4..22fb276923 100644 --- a/Client/sdk/game/CPed.h +++ b/Client/sdk/game/CPed.h @@ -285,5 +285,8 @@ class CPed : public virtual CPhysical virtual void* GetPedNodeInterface(std::int32_t nodeId) = 0; virtual std::unique_ptr GetPedIK() = 0; + virtual CEntitySAInterface* GetTargetedObject() = 0; + virtual ePedState GetPedState() = 0; + virtual void GetAttachedSatchels(std::vector &satchelsList) const = 0; }; diff --git a/Client/sdk/game/CPedIntelligence.h b/Client/sdk/game/CPedIntelligence.h index 37704ed893..f9d662e94d 100644 --- a/Client/sdk/game/CPedIntelligence.h +++ b/Client/sdk/game/CPedIntelligence.h @@ -14,6 +14,7 @@ class CPed; class CTaskSAInterface; class CTaskManager; +class CTaskSimpleUseGun; class CPedIntelligence { @@ -21,4 +22,5 @@ class CPedIntelligence virtual CTaskManager* GetTaskManager() = 0; virtual bool TestForStealthKill(CPed* pPed, bool bUnk) = 0; virtual CTaskSAInterface* SetTaskDuckSecondary(unsigned short nLengthOfDuck) = 0; + virtual CTaskSimpleUseGun* GetTaskUseGun() = 0; }; diff --git a/Client/sdk/game/CRenderer.h b/Client/sdk/game/CRenderer.h new file mode 100644 index 0000000000..65d6a8bdca --- /dev/null +++ b/Client/sdk/game/CRenderer.h @@ -0,0 +1,23 @@ +/***************************************************************************** + * + * PROJECT: Multi Theft Auto v1.0 + * LICENSE: See LICENSE in the top level directory + * FILE: sdk/game/CRenderer.h + * PURPOSE: Renderer interface + * + * Multi Theft Auto is available from http://www.multitheftauto.com/ + * + *****************************************************************************/ + +#pragma once + +class CModelInfo; +class CMatrix; + +class CRenderer +{ +public: + virtual ~CRenderer() {} + + virtual void RenderModel(CModelInfo* pModelInfo, const CMatrix& matrix) = 0; +}; diff --git a/Client/sdk/game/CSettings.h b/Client/sdk/game/CSettings.h index 1bed48acfc..d5ef10a05b 100644 --- a/Client/sdk/game/CSettings.h +++ b/Client/sdk/game/CSettings.h @@ -132,9 +132,11 @@ class CGameSettings virtual bool IsMipMappingEnabled() = 0; virtual void SetMipMappingEnabled(bool bEnable) = 0; - virtual bool IsVolumetricShadowsEnabled() = 0; + virtual bool IsVolumetricShadowsEnabled() const noexcept = 0; + virtual bool GetVolumetricShadowsEnabledByVideoSetting() const noexcept = 0; virtual void SetVolumetricShadowsEnabled(bool bEnable) = 0; virtual void SetVolumetricShadowsSuspended(bool bSuspended) = 0; + virtual bool ResetVolumetricShadows() noexcept = 0; virtual bool IsDynamicPedShadowsEnabled() = 0; virtual void SetDynamicPedShadowsEnabled(bool bEnable) = 0; diff --git a/Client/sdk/game/CVehicle.h b/Client/sdk/game/CVehicle.h index 356fe40470..a5a4f1cdd4 100644 --- a/Client/sdk/game/CVehicle.h +++ b/Client/sdk/game/CVehicle.h @@ -264,7 +264,7 @@ class CVehicle : public virtual CPhysical virtual SColor GetHeadLightColor() = 0; virtual void SetHeadLightColor(const SColor color) = 0; - virtual CObject* SpawnFlyingComponent(int i_1, unsigned int ui_2) = 0; + virtual bool SpawnFlyingComponent(const eCarNodes& nodeIndex, const eCarComponentCollisionTypes& collisionType, std::int32_t removalTime = -1) = 0; virtual void SetWheelVisibility(eWheelPosition wheel, bool bVisible) = 0; virtual CVector GetWheelPosition(eWheelPosition wheel) = 0; diff --git a/Client/sdk/game/CVisibilityPlugins.h b/Client/sdk/game/CVisibilityPlugins.h index 1d8d1b47cc..f2e948f65a 100644 --- a/Client/sdk/game/CVisibilityPlugins.h +++ b/Client/sdk/game/CVisibilityPlugins.h @@ -22,4 +22,6 @@ class CVisibilityPlugins public: virtual void SetClumpAlpha(RpClump* pClump, int iAlpha) = 0; virtual int GetAtomicId(RwObject* pAtomic) = 0; + + virtual bool InsertEntityIntoEntityList(void* entity, float distance, void* callback) = 0; }; diff --git a/Client/sdk/game/Task.h b/Client/sdk/game/Task.h index a991ad9c98..98cd45b382 100644 --- a/Client/sdk/game/Task.h +++ b/Client/sdk/game/Task.h @@ -33,7 +33,8 @@ class CTask virtual void StopTimer(const CEvent* pEvent) = 0; virtual bool MakeAbortable(CPed* pPed, const int iPriority, const CEvent* pEvent) = 0; virtual const char* GetTaskName() = 0; - virtual class CTaskSAInterface* GetInterface() = 0; + virtual class CTaskSAInterface* GetInterface() noexcept = 0; + virtual const class CTaskSAInterface* GetInterface() const noexcept = 0; virtual bool IsValid() = 0; virtual void SetAsPedTask(CPed* pPed, const int iTaskPriority, const bool bForceNewTask = false) = 0; virtual void SetAsSecondaryPedTask(CPed* pPed, const int iType) = 0; diff --git a/Client/sdk/game/TaskAttack.h b/Client/sdk/game/TaskAttack.h index 9a63e8da20..c98d062848 100644 --- a/Client/sdk/game/TaskAttack.h +++ b/Client/sdk/game/TaskAttack.h @@ -44,6 +44,8 @@ class CTaskSimpleUseGun : public virtual CTaskSimple virtual bool ControlGun(CPed* pPed, CEntity* pTargetEntity, char nCommand) = 0; virtual bool ControlGunMove(CVector2D* pMoveVec) = 0; virtual void Reset(CPed* pPed, CEntity* pTargetEntity, CVector vecTarget, char nCommand, short nBurstLength = 1) = 0; + + virtual bool GetSkipAim() = 0; }; class CTaskSimpleFight : public virtual CTaskSimple diff --git a/Client/sdk/game/TaskBasic.h b/Client/sdk/game/TaskBasic.h index 29d1db780d..8227dcf1f9 100644 --- a/Client/sdk/game/TaskBasic.h +++ b/Client/sdk/game/TaskBasic.h @@ -34,7 +34,8 @@ class CTaskSimpleRunAnim : public virtual CTaskSimpleAnim class CTaskSimpleRunNamedAnim : public virtual CTaskSimpleAnim { public: - virtual ~CTaskSimpleRunNamedAnim(){}; + virtual const char* GetAnimName() const noexcept = 0; + virtual const char* GetGroupName() const noexcept = 0; }; class CTaskComplexDie : public virtual CTaskComplex diff --git a/Client/sdk/multiplayer/CMultiplayer.h b/Client/sdk/multiplayer/CMultiplayer.h index c8b043a37f..02c932cf57 100644 --- a/Client/sdk/multiplayer/CMultiplayer.h +++ b/Client/sdk/multiplayer/CMultiplayer.h @@ -104,6 +104,7 @@ typedef void(IdleHandler)(); typedef void(PreFxRenderHandler)(); typedef void(PostColorFilterRenderHandler)(); typedef void(PreHudRenderHandler)(); +typedef void(RenderEverythingBarRoadsHandler)(); typedef CAnimBlendAssociationSAInterface*(AddAnimationHandler)(RpClump* pClump, AssocGroupId animGroup, AnimationId animID); typedef CAnimBlendAssociationSAInterface*(AddAnimationAndSyncHandler)(RpClump* pClump, CAnimBlendAssociationSAInterface* pAnimAssocToSyncWith, AssocGroupId animGroup, AnimationId animID); @@ -385,6 +386,7 @@ class CMultiplayer virtual void SetRender3DStuffHandler(Render3DStuffHandler* pHandler) = 0; virtual void SetPreRenderSkyHandler(PreRenderSkyHandler* pHandler) = 0; virtual void SetRenderHeliLightHandler(RenderHeliLightHandler* pHandler) = 0; + virtual void SetRenderEverythingBarRoadsHandler(RenderEverythingBarRoadsHandler* pHandler) = 0; virtual void Reset() = 0; diff --git a/Client/sdk/net/CNet.h b/Client/sdk/net/CNet.h index 36824b6ab3..cb38718f47 100644 --- a/Client/sdk/net/CNet.h +++ b/Client/sdk/net/CNet.h @@ -115,7 +115,7 @@ class CNet virtual const char* GetNextBuffer() = 0; virtual const char* GetDiagnosticStatus() = 0; - virtual void UpdatePingStatus(const char* szStatus, ushort& usDataRef) = 0; + virtual void UpdatePingStatus(const char* szStatus, ushort& usDataRef, bool& isVerified) = 0; virtual bool VerifySignature(const char* pData, unsigned long ulSize) = 0; diff --git a/README.md b/README.md index c10258f599..0534cfdb0b 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -## Multi Theft Auto: San Andreas +## Multi Theft Auto: San Andreas [![Build Status](https://github.com/multitheftauto/mtasa-blue/workflows/Build/badge.svg?event=push&branch=master)](https://github.com/multitheftauto/mtasa-blue/actions?query=branch%3Amaster+event%3Apush) [![Unique servers online](https://img.shields.io/endpoint?url=https%3A%2F%2Fmultitheftauto.com%2Fapi%2Fservers-shields.io.json)](https://community.multitheftauto.com/index.php?p=servers) [![Unique players online](https://img.shields.io/endpoint?url=https%3A%2F%2Fmultitheftauto.com%2Fapi%2Fplayers-shields.io.json)](https://multitheftauto.com) [![Unique players last 24 hours](https://img.shields.io/endpoint?url=https%3A%2F%2Fmultitheftauto.com%2Fapi%2Funique-players-shields.io.json)](https://multitheftauto.com) [![Discord](https://img.shields.io/discord/278474088903606273?label=discord&logo=discord)](https://discord.com/invite/mtasa) [![Crowdin](https://badges.crowdin.net/e/f5dba7b9aa6594139af737c85d81d3aa/localized.svg)](https://multitheftauto.crowdin.com/multitheftauto) @@ -30,7 +30,7 @@ Using a framework based on resources has a number of advantages. It allows conte Our project's code repository can be found on the [multitheftauto/mtasa-blue](https://github.com/multitheftauto/mtasa-blue/) Git repository at [GitHub](https://github.com/). We are always looking for new developers, so if you're interested, here are some useful links: -* [Coding guidelines](https://github.com/multitheftauto/mtasa-blue/blob/master/CONTRIBUTING.md#contributors-guide) +* [Contributors Guide and Coding Guidelines](https://github.com/multitheftauto/mtasa-docs/blob/main/mtasa-blue/CONTRIBUTING.md) * [Nightly Builds](https://nightly.multitheftauto.com/) * [Milestones](https://github.com/multitheftauto/mtasa-blue/milestones) diff --git a/Server/dbconmy/premake5.lua b/Server/dbconmy/premake5.lua index 3bd8cf5eff..0e7761c8dd 100644 --- a/Server/dbconmy/premake5.lua +++ b/Server/dbconmy/premake5.lua @@ -41,11 +41,16 @@ project "Dbconmy" includedirs { os.findheader("mysql.h", { "/usr/local/opt/mysql/include/mysql", + "/opt/homebrew/include/mysql", "/opt/osxcross/macports/pkgs/opt/local/include/mysql8/mysql", }) } libdirs { - os.findlib("libmysqlclient.a", "/opt/osxcross/macports/pkgs/opt/local/lib/mysql8/mysql") + os.findlib("libmysqlclient.a", { + "/usr/local/opt/mysql/lib", + "/opt/homebrew/lib", + "/opt/osxcross/macports/pkgs/opt/local/lib/mysql8/mysql", + }) } if GLIBC_COMPAT then diff --git a/Server/mods/deathmatch/logic/CGame.cpp b/Server/mods/deathmatch/logic/CGame.cpp index 3745d40404..d4efea393f 100644 --- a/Server/mods/deathmatch/logic/CGame.cpp +++ b/Server/mods/deathmatch/logic/CGame.cpp @@ -59,6 +59,7 @@ #include "packets/CPlayerListPacket.h" #include "packets/CPlayerClothesPacket.h" #include "packets/CServerInfoSyncPacket.h" +#include "packets/CLuaPacket.h" #include "../utils/COpenPortsTester.h" #include "../utils/CMasterServerAnnouncer.h" #include "../utils/CHqComms.h" @@ -70,6 +71,7 @@ #include "version.h" #include "net/SimHeaders.h" #include +#include #define MAX_BULLETSYNC_DISTANCE 400.0f #define MAX_EXPLOSION_SYNC_DISTANCE 400.0f @@ -78,6 +80,13 @@ #define RELEASE_MIN_CLIENT_VERSION "1.6.0-0.00000" #define FIREBALLDESTRUCT_MIN_CLIENT_VERSION "1.6.0-9.22199" +#define DEFAULT_GRAVITY 0.008f +#define DEFAULT_GAME_SPEED 1.0f +#define DEFAULT_JETPACK_MAXHEIGHT 100 +#define DEFAULT_AIRCRAFT_MAXHEIGHT 800 +#define DEFAULT_AIRCRAFT_MAXVELOCITY 1.5f +#define DEFAULT_MINUTE_DURATION 1000 + #ifndef WIN32 #include @@ -1775,7 +1784,21 @@ void CGame::Packet_PlayerJoinData(CPlayerJoinDataPacket& Packet) SString strIP = pPlayer->GetSourceIP(); SString strIPAndSerial("IP: %s Serial: %s Version: %s", strIP.c_str(), strSerial.c_str(), strPlayerVersion.c_str()); - if (!CheckNickProvided(szNick)) // check the nick is valid + + // Prevent player from connecting if serial is invalid + const std::regex serialRegex("^[A-F0-9]{32}$"); + if (!std::regex_match(strSerial, serialRegex)) + { + // Tell the console + CLogger::LogPrintf("CONNECT: %s failed to connect (Invalid serial) (%s)\n", szNick, strIPAndSerial.c_str()); + + // Tell the player the problem + DisconnectPlayer(this, *pPlayer, CPlayerDisconnectedPacket::SERIAL_VERIFICATION); + return; + } + + // Check the nick is valid + if (!CheckNickProvided(szNick)) { // Tell the console CLogger::LogPrintf("CONNECT: %s failed to connect (Invalid nickname) (%s)\n", szNick, strIPAndSerial.c_str()); @@ -4388,6 +4411,111 @@ void CGame::SetJetpackWeaponEnabled(eWeaponType weaponType, bool bEnabled) } } +void CGame::ResetWorldProperties(const ResetWorldPropsInfo& resetPropsInfo) +{ + // Reset all setWorldSpecialPropertyEnabled to default + if (resetPropsInfo.resetSpecialProperties) + { + g_pGame->SetWorldSpecialPropertyEnabled(WorldSpecialProperty::HOVERCARS, false); + g_pGame->SetWorldSpecialPropertyEnabled(WorldSpecialProperty::AIRCARS, false); + g_pGame->SetWorldSpecialPropertyEnabled(WorldSpecialProperty::EXTRABUNNY, false); + g_pGame->SetWorldSpecialPropertyEnabled(WorldSpecialProperty::EXTRAJUMP, false); + g_pGame->SetWorldSpecialPropertyEnabled(WorldSpecialProperty::RANDOMFOLIAGE, true); + g_pGame->SetWorldSpecialPropertyEnabled(WorldSpecialProperty::SNIPERMOON, false); + g_pGame->SetWorldSpecialPropertyEnabled(WorldSpecialProperty::EXTRAAIRRESISTANCE, true); + g_pGame->SetWorldSpecialPropertyEnabled(WorldSpecialProperty::UNDERWORLDWARP, true); + g_pGame->SetWorldSpecialPropertyEnabled(WorldSpecialProperty::VEHICLESUNGLARE, false); + g_pGame->SetWorldSpecialPropertyEnabled(WorldSpecialProperty::CORONAZTEST, true); + g_pGame->SetWorldSpecialPropertyEnabled(WorldSpecialProperty::WATERCREATURES, true); + g_pGame->SetWorldSpecialPropertyEnabled(WorldSpecialProperty::BURNFLIPPEDCARS, true); + g_pGame->SetWorldSpecialPropertyEnabled(WorldSpecialProperty::FIREBALLDESTRUCT, true); + g_pGame->SetWorldSpecialPropertyEnabled(WorldSpecialProperty::ROADSIGNSTEXT, true); + g_pGame->SetWorldSpecialPropertyEnabled(WorldSpecialProperty::EXTENDEDWATERCANNONS, true); + g_pGame->SetWorldSpecialPropertyEnabled(WorldSpecialProperty::TUNNELWEATHERBLEND, true); + } + + // Reset all weather stuff like heat haze, wind velocity etc + if (resetPropsInfo.resetWeatherProperties) + { + g_pGame->SetHasHeatHaze(false); + g_pGame->SetHasFogDistance(false); + g_pGame->SetHasMoonSize(false); + g_pGame->SetHasSkyGradient(false); + g_pGame->SetHasSunColor(false); + g_pGame->SetHasSunSize(false); + g_pGame->SetHasWindVelocity(false); + + float defaultRainLevel = 0.0f; + g_pGame->SetRainLevel(defaultRainLevel); + g_pGame->SetHasRainLevel(false); + } + + // Restore interiors sounds + if (resetPropsInfo.resetSounds) + g_pGame->SetInteriorSoundsEnabled(true); + + // Disable all glitches + if (resetPropsInfo.resetGlitches) + { + for (const auto& iter : m_GlitchNames) + CStaticFunctionDefinitions::SetGlitchEnabled(iter.first, false); + } + + // Reset jetpack weapons + if (resetPropsInfo.resetJetpackWeapons) + { + for (std::uint8_t i = 0; i < WEAPONTYPE_LAST_WEAPONTYPE; i++) + CStaticFunctionDefinitions::SetJetpackWeaponEnabled(static_cast(i), false); + + CStaticFunctionDefinitions::SetJetpackWeaponEnabled(WEAPONTYPE_MICRO_UZI, true); + CStaticFunctionDefinitions::SetJetpackWeaponEnabled(WEAPONTYPE_TEC9, true); + CStaticFunctionDefinitions::SetJetpackWeaponEnabled(WEAPONTYPE_PISTOL, true); + } + + // Reset all other world stuff + // Reset far clip distance + g_pGame->SetHasFarClipDistance(false); + + // Reset clouds + g_pGame->SetCloudsEnabled(true); + + // Reset occlusions + g_pGame->SetOcclusionsEnabled(true); + + // Reset gravity + g_pGame->SetGravity(DEFAULT_GRAVITY); + + // Reset game speed + g_pGame->SetGameSpeed(DEFAULT_GAME_SPEED); + + // Reset aircraft max velocity & height + g_pGame->SetAircraftMaxHeight(DEFAULT_AIRCRAFT_MAXHEIGHT); + g_pGame->SetAircraftMaxVelocity(DEFAULT_AIRCRAFT_MAXVELOCITY); + + // Reset jetpack max height + g_pGame->SetJetpackMaxHeight(DEFAULT_JETPACK_MAXHEIGHT); + + // Reset minute duration + m_pMapManager->GetServerClock()->SetMinuteDuration(DEFAULT_MINUTE_DURATION); + + // Reset water color, water level & wave height + g_pGame->SetHasWaterColor(false); + m_pWaterManager->ResetWorldWaterLevel(); + m_pWaterManager->SetGlobalWaveHeight(0.0f); + + // Reset traffic lights + g_pGame->SetTrafficLightsLocked(false); + + // Send it to everyone + CBitStream bitStream; + bitStream->WriteBit(resetPropsInfo.resetSpecialProperties); + bitStream->WriteBit(resetPropsInfo.resetWorldProperties); + bitStream->WriteBit(resetPropsInfo.resetWeatherProperties); + bitStream->WriteBit(resetPropsInfo.resetLODs); + bitStream->WriteBit(resetPropsInfo.resetSounds); + m_pPlayerManager->BroadcastOnlyJoined(CLuaPacket(RESET_WORLD_PROPERTIES, *bitStream.pBitStream)); +} + // // Handle basic backup of databases and config files // diff --git a/Server/mods/deathmatch/logic/CGame.h b/Server/mods/deathmatch/logic/CGame.h index 22e38aadf4..d865e858ec 100644 --- a/Server/mods/deathmatch/logic/CGame.h +++ b/Server/mods/deathmatch/logic/CGame.h @@ -134,6 +134,17 @@ class CWeaponDamageCheckPacket; typedef SFixedArray SGarageStates; +struct ResetWorldPropsInfo +{ + bool resetSpecialProperties{}; + bool resetWorldProperties{}; + bool resetWeatherProperties{}; + bool resetLODs{}; + bool resetSounds{}; + bool resetGlitches{}; + bool resetJetpackWeapons{}; +}; + // CSendList - Can be used like a std::list of players for sending packets. // Used to construct an optimized list of players for CGame::Broadcast class CSendList : public std::multimap @@ -432,6 +443,8 @@ class CGame int GetMoonSize() { return m_iMoonSize; } void SetMoonSize(int iMoonSize) { m_iMoonSize = iMoonSize; } + void ResetWorldProperties(const ResetWorldPropsInfo& resetPropsInfo); + void PrintLogOutputFromNetModule(); void StartOpenPortsTest(); diff --git a/Server/mods/deathmatch/logic/CObject.cpp b/Server/mods/deathmatch/logic/CObject.cpp index c88dbf3e60..8094f9dda9 100644 --- a/Server/mods/deathmatch/logic/CObject.cpp +++ b/Server/mods/deathmatch/logic/CObject.cpp @@ -33,6 +33,7 @@ CObject::CObject(CElement* pParent, CObjectManager* pObjectManager, bool bIsLowL m_bIsFrozen = false; m_bDoubleSided = false; m_bBreakable = false; + m_bRespawnable = true; m_bCollisionsEnabled = true; @@ -58,6 +59,7 @@ CObject::CObject(const CObject& Copy) : CElement(Copy.m_pParent), m_bIsLowLod(Co m_bBreakable = Copy.m_bBreakable; m_vecPosition = Copy.m_vecPosition; m_vecRotation = Copy.m_vecRotation; + m_bRespawnable = Copy.m_bRespawnable; m_pMoveAnimation = NULL; if (Copy.m_pMoveAnimation != NULL) diff --git a/Server/mods/deathmatch/logic/CObject.h b/Server/mods/deathmatch/logic/CObject.h index 9e2c23c360..e5032b91ce 100644 --- a/Server/mods/deathmatch/logic/CObject.h +++ b/Server/mods/deathmatch/logic/CObject.h @@ -81,6 +81,9 @@ class CObject : public CElement bool IsBreakable() { return m_bBreakable; } void SetBreakable(bool bBreakable) { m_bBreakable = bBreakable; } + bool IsRespawnEnabled() const noexcept { return m_bRespawnable; } + void SetRespawnEnabled(bool bRespawn) noexcept { m_bRespawnable = bRespawn; } + protected: bool ReadSpecialData(const int iLine) override; @@ -96,6 +99,7 @@ class CObject : public CElement bool m_bSyncable; CPlayer* m_pSyncer; bool m_bVisibleInAllDimensions = false; + bool m_bRespawnable; protected: bool m_bCollisionsEnabled; diff --git a/Server/mods/deathmatch/logic/CPerfStat.RPCPacketUsage.cpp b/Server/mods/deathmatch/logic/CPerfStat.RPCPacketUsage.cpp index 2f9cfa8ce9..fd4bd0b8bc 100644 --- a/Server/mods/deathmatch/logic/CPerfStat.RPCPacketUsage.cpp +++ b/Server/mods/deathmatch/logic/CPerfStat.RPCPacketUsage.cpp @@ -226,6 +226,11 @@ ADD_ENUM1(SET_COLPOLYGON_HEIGHT) ADD_ENUM1(SET_OBJECT_BREAKABLE) ADD_ENUM1(BREAK_OBJECT) ADD_ENUM1(SET_PLAYER_SCRIPT_DEBUG_LEVEL) +ADD_ENUM1(SET_MARKER_TARGET_ARROW_PROPERTIES) +ADD_ENUM1(RESPAWN_OBJECT) +ADD_ENUM1(TOGGLE_OBJECT_RESPAWN) +ADD_ENUM1(RESET_WORLD_PROPERTIES) +ADD_ENUM1(SPAWN_VEHICLE_FLYING_COMPONENT) IMPLEMENT_ENUM_END("eElementRPCFunctions") DECLARE_ENUM(CRPCFunctions::eRPCFunctions); diff --git a/Server/mods/deathmatch/logic/CResource.cpp b/Server/mods/deathmatch/logic/CResource.cpp index bd2a32b266..1c2ebe3ea8 100644 --- a/Server/mods/deathmatch/logic/CResource.cpp +++ b/Server/mods/deathmatch/logic/CResource.cpp @@ -1371,6 +1371,9 @@ std::vector CResource::GetFilePaths(const char* szFilename) std::string strPath = std::filesystem::relative(path, strDirectory).string(); ReplaceSlashes(strPath); + if (strPath == "meta.xml") + continue; + vecFiles.push_back(std::move(strPath)); } @@ -1462,44 +1465,55 @@ bool CResource::ReadIncludedHTML(CXMLNode* pRoot) if (!strFilename.empty()) { - std::string strFullFilename; ReplaceSlashes(strFilename); - if (IsFilenameUsed(strFilename, false)) + if (!IsValidFilePath(strFilename.c_str())) { - CLogger::LogPrintf("WARNING: Duplicate html file in resource '%s': '%s'\n", m_strResourceName.c_str(), strFilename.c_str()); + m_strFailureReason = SString("Couldn't find html %s for resource %s\n", strFilename.c_str(), m_strResourceName.c_str()); + CLogger::ErrorPrintf(m_strFailureReason); + return false; } - // Try to find the file - if (IsValidFilePath(strFilename.c_str()) && GetFilePath(strFilename.c_str(), strFullFilename)) + std::vector vecFiles = GetFilePaths(strFilename.c_str()); + if (vecFiles.empty()) { - // This one is supposed to be default, but there's already a default page - if (bFoundDefault && bIsDefault) + if (glob::has_magic(strFilename)) { - CLogger::LogPrintf("Only one html item can be default per resource, ignoring %s in %s\n", strFilename.c_str(), - m_strResourceName.c_str()); - bIsDefault = false; + m_ResourceFilesCountPerDir[strFilename] = vecFiles.size(); + continue; } - // If this is supposed to be default, we've now found our default page - if (bIsDefault) - bFoundDefault = true; - - // Create a new resource HTML file and add it to the list - auto pResourceFile = new CResourceHTMLItem(this, strFilename.c_str(), strFullFilename.c_str(), &Attributes, bIsDefault, bIsRaw, - bIsRestricted, m_bOOPEnabledInMetaXml); - m_ResourceFiles.push_back(pResourceFile); - - // This is the first HTML file? Remember it - if (!pFirstHTML) - pFirstHTML = pResourceFile; - } - else - { m_strFailureReason = SString("Couldn't find html %s for resource %s\n", strFilename.c_str(), m_strResourceName.c_str()); CLogger::ErrorPrintf(m_strFailureReason); return false; } + + for (const std::string& strFilePath : vecFiles) + { + std::string strFullFilename; + + if (GetFilePath(strFilePath.c_str(), strFullFilename)) + { + // This one is supposed to be default, but there's already a default page + if (bFoundDefault && bIsDefault) + { + CLogger::LogPrintf("Only one html item can be default per resource, ignoring %s in %s\n", strFilename.c_str(), m_strResourceName.c_str()); + bIsDefault = false; + } + + // If this is supposed to be default, we've now found our default page + if (bIsDefault) + bFoundDefault = true; + + // Create a new resource HTML file and add it to the list + auto pResourceFile = new CResourceHTMLItem(this, strFilename.c_str(), strFullFilename.c_str(), &Attributes, bIsDefault, bIsRaw, bIsRestricted, m_bOOPEnabledInMetaXml); + m_ResourceFiles.push_back(pResourceFile); + + // This is the first HTML file? Remember it + if (!pFirstHTML) + pFirstHTML = pResourceFile; + } + } } else { @@ -3011,7 +3025,7 @@ HttpStatusCode CResource::HandleRequestRouter(HttpRequest* request, HttpResponse luaRequest.PushString("path"); luaRequest.PushString(path); - luaRequest.PushString("absolute_path"); + luaRequest.PushString("absolutePath"); luaRequest.PushString(request->sOriginalUri); luaRequest.PushString("hostname"); diff --git a/Server/mods/deathmatch/logic/CResourceChecker.Data.h b/Server/mods/deathmatch/logic/CResourceChecker.Data.h index a0234eb386..e6bdee9212 100644 --- a/Server/mods/deathmatch/logic/CResourceChecker.Data.h +++ b/Server/mods/deathmatch/logic/CResourceChecker.Data.h @@ -168,7 +168,9 @@ namespace // Base Encoding & Decoding {false, "base64Encode", "encodeString"}, - {false, "base64Decode", "decodeString"} + {false, "base64Decode", "decodeString"}, + + {false, "setHelicopterRotorSpeed", "setVehicleRotorSpeed"} }; SDeprecatedItem serverDeprecatedList[] = { diff --git a/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp b/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp index ab24fe0d66..67764f8057 100644 --- a/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp +++ b/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.cpp @@ -8358,6 +8358,43 @@ bool CStaticFunctionDefinitions::SetObjectBreakable(CElement* pElement, const bo return false; } +bool CStaticFunctionDefinitions::RespawnObject(CElement* const pElement) noexcept +{ + RUN_CHILDREN(RespawnObject(*iter)); + + if (!IS_OBJECT(pElement)) + return false; + + CObject* pObject = static_cast(pElement); + if (!pObject) + return false; + + CBitStream BitStream; + m_pPlayerManager->BroadcastOnlyJoined(CElementRPCPacket(pObject, RESPAWN_OBJECT, *BitStream.pBitStream)); + + return true; +} + +bool CStaticFunctionDefinitions::ToggleObjectRespawn(CElement* const pElement, const bool bRespawn) noexcept +{ + RUN_CHILDREN(ToggleObjectRespawn(*iter, bRespawn)); + + if (!IS_OBJECT(pElement)) + return false; + + CObject* pObject = static_cast(pElement); + if (!pObject) + return false; + + pObject->SetRespawnEnabled(bRespawn); + + CBitStream BitStream; + BitStream->WriteBit(bRespawn); + m_pPlayerManager->BroadcastOnlyJoined(CElementRPCPacket(pObject, TOGGLE_OBJECT_RESPAWN, *BitStream.pBitStream)); + + return true; +} + CRadarArea* CStaticFunctionDefinitions::CreateRadarArea(CResource* pResource, const CVector2D& vecPosition2D, const CVector2D& vecSize, const SColor color, CElement* pVisibleTo) { @@ -12451,3 +12488,14 @@ bool CStaticFunctionDefinitions::SetColPolygonHeight(CColPolygon* pColPolygon, f return false; } + +bool CStaticFunctionDefinitions::SpawnVehicleFlyingComponent(CVehicle* const vehicle, std::uint8_t nodeIndex, std::uint8_t collisionType, std::int32_t removalTime) +{ + CBitStream bitStream; + bitStream.pBitStream->Write(nodeIndex); + bitStream.pBitStream->Write(collisionType); + bitStream.pBitStream->Write(removalTime); + m_pPlayerManager->BroadcastOnlyJoined(CElementRPCPacket(vehicle, SPAWN_VEHICLE_FLYING_COMPONENT, *bitStream.pBitStream)); + + return true; +} diff --git a/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.h b/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.h index 2f260e3ea5..dd6202208f 100644 --- a/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.h +++ b/Server/mods/deathmatch/logic/CStaticFunctionDefinitions.h @@ -241,6 +241,7 @@ class CStaticFunctionDefinitions // Vehicle create/destroy functions static CVehicle* CreateVehicle(CResource* pResource, unsigned short usModel, const CVector& vecPosition, const CVector& vecRotation, const char* szRegPlate, unsigned char ucVariant, unsigned char ucVariant2, bool bSynced); + static bool SpawnVehicleFlyingComponent(CVehicle* const vehicle, std::uint8_t nodeIndex, std::uint8_t collisionType, std::int32_t removalTime = -1); // Vehicle get functions static bool GetVehicleVariant(CVehicle* pVehicle, unsigned char& ucVariant, unsigned char& ucVariant2); @@ -424,6 +425,8 @@ class CStaticFunctionDefinitions static bool BreakObject(CElement* pElement); static bool SetObjectVisibleInAllDimensions(CElement* pElement, bool bVisible, unsigned short usNewDimension = 0); static bool SetObjectBreakable(CElement* pElement, const bool bBreakable); + static bool RespawnObject(CElement* const pElement) noexcept; + static bool ToggleObjectRespawn(CElement* const pElement, const bool bRespawn) noexcept; // Radar area create/destroy funcs static CRadarArea* CreateRadarArea(CResource* pResource, const CVector2D& vecPosition, const CVector2D& vecSize, const SColor color, CElement* pVisibleTo); diff --git a/Server/mods/deathmatch/logic/CVehicle.h b/Server/mods/deathmatch/logic/CVehicle.h index 10de01e625..d5dbb43243 100644 --- a/Server/mods/deathmatch/logic/CVehicle.h +++ b/Server/mods/deathmatch/logic/CVehicle.h @@ -111,6 +111,49 @@ enum eVehicleType VEHICLE_TRAILER }; +enum class eCarNodes +{ + NONE = 0, + CHASSIS, + WHEEL_RF, + WHEEL_RM, + WHEEL_RB, + WHEEL_LF, + WHEEL_LM, + WHEEL_LB, + DOOR_RF, + DOOR_RR, + DOOR_LF, + DOOR_LR, + BUMP_FRONT, + BUMP_REAR, + WING_RF, + WING_LF, + BONNET, + BOOT, + WINDSCREEN, + EXHAUST, + MISC_A, + MISC_B, + MISC_C, + MISC_D, + MISC_E, + + NUM_NODES +}; + +enum class eCarComponentCollisionTypes +{ + COL_NODE_BUMPER = 0, + COL_NODE_WHEEL, + COL_NODE_DOOR, + COL_NODE_BONNET, + COL_NODE_BOOT, + COL_NODE_PANEL, + + COL_NODES_NUM +}; + #define SIREN_TYPE_FIRST 1 #define SIREN_TYPE_LAST 6 #define SIREN_ID_MAX 7 diff --git a/Server/mods/deathmatch/logic/lua/CLuaTimerManager.cpp b/Server/mods/deathmatch/logic/lua/CLuaTimerManager.cpp index fbd86eccaf..0af771b289 100644 --- a/Server/mods/deathmatch/logic/lua/CLuaTimerManager.cpp +++ b/Server/mods/deathmatch/logic/lua/CLuaTimerManager.cpp @@ -26,7 +26,10 @@ void CLuaTimerManager::DoPulse(CLuaMain* pLuaMain) // Use a separate queue to avoid trouble // What kind of problems are we trying to avoid? Doing a copy each frame isn't quite efficient for (CFastList::const_iterator iter = m_TimerList.begin(); iter != m_TimerList.end(); ++iter) - m_ProcessQueue.push_back(*iter); + { + if (!(*iter)->IsPaused()) + m_ProcessQueue.push_back(*iter); + } while (!m_ProcessQueue.empty()) { @@ -113,6 +116,15 @@ void CLuaTimerManager::RemoveAllTimers() m_pProcessingTimer = NULL; } +void CLuaTimerManager::SetTimerPaused(CLuaTimer* timer, bool paused) +{ + assert(timer); + + timer->SetPaused(paused); + if (paused) + ListRemove(m_ProcessQueue, timer); +} + void CLuaTimerManager::ResetTimer(CLuaTimer* pLuaTimer) { assert(pLuaTimer); diff --git a/Server/mods/deathmatch/logic/lua/CLuaTimerManager.h b/Server/mods/deathmatch/logic/lua/CLuaTimerManager.h index d9d2fc41f2..d63e659147 100644 --- a/Server/mods/deathmatch/logic/lua/CLuaTimerManager.h +++ b/Server/mods/deathmatch/logic/lua/CLuaTimerManager.h @@ -36,6 +36,7 @@ class CLuaTimerManager void RemoveAllTimers(); unsigned long GetTimerCount() const { return m_TimerList.size(); } + void SetTimerPaused(CLuaTimer* timer, bool paused); void ResetTimer(CLuaTimer* pLuaTimer); CFastList::const_iterator IterBegin() { return m_TimerList.begin(); } diff --git a/Server/mods/deathmatch/logic/luadefs/CLuaObjectDefs.cpp b/Server/mods/deathmatch/logic/luadefs/CLuaObjectDefs.cpp index 22d7e6b316..898825673c 100644 --- a/Server/mods/deathmatch/logic/luadefs/CLuaObjectDefs.cpp +++ b/Server/mods/deathmatch/logic/luadefs/CLuaObjectDefs.cpp @@ -19,12 +19,14 @@ void CLuaObjectDefs::LoadFunctions() constexpr static const std::pair functions[]{ // Object create/destroy funcs {"createObject", CreateObject}, + {"respawnObject", ArgumentParser}, // Object get funcs {"getObjectRotation", GetObjectRotation}, {"getObjectScale", GetObjectScale}, {"isObjectBreakable", ArgumentParser}, {"isObjectMoving", ArgumentParser}, + {"isObjectRespawnable", ArgumentParser}, // Object set funcs {"setObjectRotation", SetObjectRotation}, @@ -33,6 +35,7 @@ void CLuaObjectDefs::LoadFunctions() {"moveObject", MoveObject}, {"stopObject", StopObject}, {"breakObject", ArgumentParser}, + {"toggleObjectRespawn", ArgumentParser}, }; // Add functions @@ -48,16 +51,19 @@ void CLuaObjectDefs::AddClass(lua_State* luaVM) lua_classfunction(luaVM, "move", "moveObject"); lua_classfunction(luaVM, "stop", "stopObject"); lua_classfunction(luaVM, "break", "breakObject"); + lua_classfunction(luaVM, "respawn", "respawnObject"); lua_classfunction(luaVM, "getScale", "getObjectScale"); lua_classfunction(luaVM, "setScale", "setObjectScale"); lua_classfunction(luaVM, "isBreakable", "isObjectBreakable"); lua_classfunction(luaVM, "setBreakable", "setObjectBreakable"); lua_classfunction(luaVM, "isMoving", "isObjectMoving"); + lua_classfunction(luaVM, "toggleRespawn", "toggleObjectRespawn"); lua_classvariable(luaVM, "scale", "setObjectScale", "getObjectScale"); lua_classvariable(luaVM, "breakable", "setObjectBreakable", "isObjectBreakable"); lua_classvariable(luaVM, "moving", nullptr, "isObjectMoving"); + lua_classvariable(luaVM, "isRespawnable", nullptr, "isObjectRespawnable"); lua_registerclass(luaVM, "Object", "Element"); } @@ -312,3 +318,18 @@ bool CLuaObjectDefs::BreakObject(CObject* const pObject) { return CStaticFunctionDefinitions::BreakObject(pObject); } + +bool CLuaObjectDefs::RespawnObject(CObject* const pObject) noexcept +{ + return CStaticFunctionDefinitions::RespawnObject(pObject); +} + +bool CLuaObjectDefs::ToggleObjectRespawn(CObject* const pObject, const bool bRespawn) noexcept +{ + return CStaticFunctionDefinitions::ToggleObjectRespawn(pObject, bRespawn); +} + +bool CLuaObjectDefs::IsObjectRespawnable(CObject* const pObject) noexcept +{ + return pObject->IsRespawnEnabled(); +} diff --git a/Server/mods/deathmatch/logic/luadefs/CLuaObjectDefs.h b/Server/mods/deathmatch/logic/luadefs/CLuaObjectDefs.h index 159ba47d28..76a96a982b 100644 --- a/Server/mods/deathmatch/logic/luadefs/CLuaObjectDefs.h +++ b/Server/mods/deathmatch/logic/luadefs/CLuaObjectDefs.h @@ -20,6 +20,7 @@ class CLuaObjectDefs : public CLuaDefs // Object create/destroy functions LUA_DECLARE(CreateObject); + static bool RespawnObject(CObject* const pObject) noexcept; // Object get functions LUA_DECLARE(GetObjectName); @@ -27,6 +28,7 @@ class CLuaObjectDefs : public CLuaDefs LUA_DECLARE(GetObjectScale); static bool IsObjectBreakable(CObject* const pObject); static bool IsObjectMoving(CObject* const pObject); + static bool IsObjectRespawnable(CObject* const pObject) noexcept; // Object set functions LUA_DECLARE(SetObjectName); @@ -36,4 +38,5 @@ class CLuaObjectDefs : public CLuaDefs LUA_DECLARE(MoveObject); LUA_DECLARE(StopObject); static bool BreakObject(CObject* const pObject); + static bool ToggleObjectRespawn(CObject* const pObject, const bool bRespawn) noexcept; }; diff --git a/Server/mods/deathmatch/logic/luadefs/CLuaTimerDefs.cpp b/Server/mods/deathmatch/logic/luadefs/CLuaTimerDefs.cpp index 49c83bd576..c3e0478c8b 100644 --- a/Server/mods/deathmatch/logic/luadefs/CLuaTimerDefs.cpp +++ b/Server/mods/deathmatch/logic/luadefs/CLuaTimerDefs.cpp @@ -16,8 +16,9 @@ void CLuaTimerDefs::LoadFunctions() { constexpr static const std::pair functions[]{ - {"setTimer", SetTimer}, {"killTimer", KillTimer}, {"resetTimer", ResetTimer}, - {"getTimers", GetTimers}, {"isTimer", IsTimer}, {"getTimerDetails", GetTimerDetails}, + {"setTimer", SetTimer}, {"killTimer", KillTimer}, {"resetTimer", ResetTimer}, + {"setTimerPaused", ArgumentParser},{"isTimerPaused", ArgumentParser}, + {"getTimers", GetTimers}, {"isTimer", IsTimer},{"getTimerDetails", GetTimerDetails}, }; // Add functions @@ -33,10 +34,10 @@ void CLuaTimerDefs::AddClass(lua_State* luaVM) lua_classfunction(luaVM, "destroy", "killTimer"); lua_classfunction(luaVM, "reset", "resetTimer"); lua_classfunction(luaVM, "isValid", "isTimer"); - lua_classfunction(luaVM, "getDetails", "getTimerDetails"); lua_classvariable(luaVM, "valid", NULL, "isTimer"); + lua_classvariable(luaVM, "paused", "setTimerPaused", "isTimerPaused"); lua_registerclass(luaVM, "Timer"); } @@ -114,6 +115,22 @@ int CLuaTimerDefs::KillTimer(lua_State* luaVM) return 1; } +bool CLuaTimerDefs::IsTimerPaused(CLuaTimer* timer) noexcept +{ + return timer->IsPaused(); +} + +bool CLuaTimerDefs::SetTimerPaused(lua_State* luaVM, CLuaTimer* timer, bool paused) +{ + // bool setTimerPaused ( timer theTimer, bool paused ) + CLuaMain* luaMain = m_pLuaManager->GetVirtualMachine(luaVM); + if (!luaMain) + return false; + + luaMain->GetTimerManager()->SetTimerPaused(timer, paused); + return true; +} + int CLuaTimerDefs::ResetTimer(lua_State* luaVM) { // bool resetTimer ( timer theTimer ) diff --git a/Server/mods/deathmatch/logic/luadefs/CLuaTimerDefs.h b/Server/mods/deathmatch/logic/luadefs/CLuaTimerDefs.h index fd37e2aaa4..abf1b725d6 100644 --- a/Server/mods/deathmatch/logic/luadefs/CLuaTimerDefs.h +++ b/Server/mods/deathmatch/logic/luadefs/CLuaTimerDefs.h @@ -24,4 +24,6 @@ class CLuaTimerDefs : public CLuaDefs LUA_DECLARE(GetTimers); LUA_DECLARE(IsTimer); LUA_DECLARE(GetTimerDetails); -}; \ No newline at end of file + static bool IsTimerPaused(CLuaTimer* timer) noexcept; + static bool SetTimerPaused(lua_State* luaVM, CLuaTimer* timer, bool paused); +}; diff --git a/Server/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.cpp b/Server/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.cpp index 294ea7310c..d34d8fe579 100644 --- a/Server/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.cpp +++ b/Server/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.cpp @@ -22,6 +22,7 @@ void CLuaVehicleDefs::LoadFunctions() constexpr static const std::pair functions[]{ // Vehicle create/destroy funcs {"createVehicle", CreateVehicle}, + {"spawnVehicleFlyingComponent", ArgumentParser}, // Vehicle get funcs {"getVehicleType", GetVehicleType}, @@ -241,6 +242,7 @@ void CLuaVehicleDefs::AddClass(lua_State* luaVM) // lua_classfunction(luaVM, "setTrack", "setTrainTrack"); lua_classfunction(luaVM, "setTrainPosition", "setTrainPosition"); lua_classfunction(luaVM, "setTrainSpeed", "setTrainSpeed"); // Reduce confusion + lua_classfunction(luaVM, "spawnFlyingComponent", "spawnVehicleFlyingComponent"); lua_classvariable(luaVM, "damageProof", "setVehicleDamageProof", "isVehicleDamageProof"); lua_classvariable(luaVM, "locked", "setVehicleLocked", "isVehicleLocked"); @@ -2982,3 +2984,65 @@ int CLuaVehicleDefs::SetVehiclePlateText(lua_State* luaVM) lua_pushboolean(luaVM, false); return 1; } + +bool CLuaVehicleDefs::SpawnVehicleFlyingComponent(CVehicle* const vehicle, std::uint8_t nodeIndex, std::optional componentCollisionType, std::optional removalTime) +{ + auto partNodeIndex = static_cast(nodeIndex); + auto collisionType = componentCollisionType.has_value() ? static_cast(componentCollisionType.value()) : eCarComponentCollisionTypes::COL_NODE_PANEL; + + if (nodeIndex < 1 || partNodeIndex >= eCarNodes::NUM_NODES) + throw std::invalid_argument("Invalid component index"); + + if (collisionType >= eCarComponentCollisionTypes::COL_NODES_NUM) + throw std::invalid_argument("Invalid collision type index"); + + if (!componentCollisionType.has_value()) + { + switch (partNodeIndex) + { + case eCarNodes::WHEEL_RF: + case eCarNodes::WHEEL_RB: + case eCarNodes::WHEEL_LF: + case eCarNodes::WHEEL_LB: + { + collisionType = eCarComponentCollisionTypes::COL_NODE_WHEEL; + break; + } + case eCarNodes::DOOR_RF: + case eCarNodes::DOOR_RR: + case eCarNodes::DOOR_LF: + case eCarNodes::DOOR_LR: + { + collisionType = eCarComponentCollisionTypes::COL_NODE_DOOR; + break; + } + case eCarNodes::BUMP_FRONT: + case eCarNodes::BUMP_REAR: + case eCarNodes::WHEEL_LM: + case eCarNodes::WHEEL_RM: + { + collisionType = eCarComponentCollisionTypes::COL_NODE_BUMPER; + break; + } + case eCarNodes::BOOT: + case eCarNodes::CHASSIS: + { + collisionType = eCarComponentCollisionTypes::COL_NODE_BOOT; + break; + } + case eCarNodes::BONNET: + case eCarNodes::WINDSCREEN: + { + collisionType = eCarComponentCollisionTypes::COL_NODE_BONNET; + break; + } + default: + { + collisionType = eCarComponentCollisionTypes::COL_NODE_PANEL; + break; + } + } + } + + return CStaticFunctionDefinitions::SpawnVehicleFlyingComponent(vehicle, nodeIndex, static_cast(collisionType), removalTime.value_or(-1)); +} diff --git a/Server/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.h b/Server/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.h index 3200e2ada3..b349736113 100644 --- a/Server/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.h +++ b/Server/mods/deathmatch/logic/luadefs/CLuaVehicleDefs.h @@ -125,4 +125,6 @@ class CLuaVehicleDefs : public CLuaDefs LUA_DECLARE(GetVehicleSirens); LUA_DECLARE(GetVehicleSirenParams); LUA_DECLARE(SetVehiclePlateText); + + static bool SpawnVehicleFlyingComponent(CVehicle* const vehicle, std::uint8_t nodeIndex, std::optional componentCollisionType, std::optional removalTime); }; diff --git a/Server/mods/deathmatch/logic/luadefs/CLuaWorldDefs.cpp b/Server/mods/deathmatch/logic/luadefs/CLuaWorldDefs.cpp index 0beb88d8ab..480e9bd5cf 100644 --- a/Server/mods/deathmatch/logic/luadefs/CLuaWorldDefs.cpp +++ b/Server/mods/deathmatch/logic/luadefs/CLuaWorldDefs.cpp @@ -87,6 +87,7 @@ void CLuaWorldDefs::LoadFunctions() {"restoreWorldModel", RestoreWorldModel}, {"restoreAllWorldModels", RestoreAllWorldModels}, {"resetMoonSize", resetMoonSize}, + {"resetWorldProperties", ArgumentParser}, // Check {"isGarageOpen", isGarageOpen}, @@ -1448,3 +1449,8 @@ int CLuaWorldDefs::getOcclusionsEnabled(lua_State* luaVM) lua_pushboolean(luaVM, false); return 1; } + +void CLuaWorldDefs::ResetWorldProperties(std::optional resetSpecialWorldProperties, std::optional resetWorldProperties, std::optional resetWeatherProperties, std::optional resetLODs, std::optional resetSounds, std::optional resetGlitches, std::optional resetJetpackWeapons) noexcept +{ + g_pGame->ResetWorldProperties(ResetWorldPropsInfo{resetSpecialWorldProperties.value_or(true), resetWorldProperties.value_or(true), resetWeatherProperties.value_or(true), resetLODs.value_or(true), resetSounds.value_or(true), resetGlitches.value_or(true), resetJetpackWeapons.value_or(true)}); +} diff --git a/Server/mods/deathmatch/logic/luadefs/CLuaWorldDefs.h b/Server/mods/deathmatch/logic/luadefs/CLuaWorldDefs.h index 6e7e8675e6..7859034e3b 100644 --- a/Server/mods/deathmatch/logic/luadefs/CLuaWorldDefs.h +++ b/Server/mods/deathmatch/logic/luadefs/CLuaWorldDefs.h @@ -94,4 +94,6 @@ class CLuaWorldDefs : public CLuaDefs LUA_DECLARE(RestoreWorldModel); LUA_DECLARE(RestoreAllWorldModels); LUA_DECLARE(resetMoonSize); + + static void ResetWorldProperties(std::optional resetSpecialWorldProperties, std::optional resetWorldProperties, std::optional resetWeatherProperties, std::optional resetLODs, std::optional resetSounds, std::optional resetGlitches, std::optional resetJetpackWeapons) noexcept; }; diff --git a/Server/mods/deathmatch/logic/packets/CEntityAddPacket.cpp b/Server/mods/deathmatch/logic/packets/CEntityAddPacket.cpp index 2502b4cc30..a001ba518f 100644 --- a/Server/mods/deathmatch/logic/packets/CEntityAddPacket.cpp +++ b/Server/mods/deathmatch/logic/packets/CEntityAddPacket.cpp @@ -301,6 +301,10 @@ bool CEntityAddPacket::Write(NetBitStreamInterface& BitStream) const if (BitStream.Can(eBitStreamVersion::BreakObject_Serverside)) BitStream.WriteBit(pObject->GetHealth() <= 0); + // Respawnable + if (BitStream.Can(eBitStreamVersion::RespawnObject_Serverside)) + BitStream.WriteBit(pObject->IsRespawnEnabled()); + if (ucEntityTypeID == CElement::WEAPON) { CCustomWeapon* pWeapon = static_cast(pElement); diff --git a/Shared/data/MTA San Andreas/MTA/XInput9_1_0_mta.dll b/Shared/data/MTA San Andreas/MTA/XInput9_1_0_mta.dll index 3483103b05..74387b0013 100644 Binary files a/Shared/data/MTA San Andreas/MTA/XInput9_1_0_mta.dll and b/Shared/data/MTA San Andreas/MTA/XInput9_1_0_mta.dll differ diff --git a/Shared/data/MTA San Andreas/MTA/bass_aac.dll b/Shared/data/MTA San Andreas/MTA/bass_aac.dll index 84e82ec090..91f61becc3 100644 Binary files a/Shared/data/MTA San Andreas/MTA/bass_aac.dll and b/Shared/data/MTA San Andreas/MTA/bass_aac.dll differ diff --git a/Shared/data/MTA San Andreas/MTA/bass_ac3.dll b/Shared/data/MTA San Andreas/MTA/bass_ac3.dll index ba58ffb6dc..abbb2d6bd8 100644 Binary files a/Shared/data/MTA San Andreas/MTA/bass_ac3.dll and b/Shared/data/MTA San Andreas/MTA/bass_ac3.dll differ diff --git a/Shared/data/MTA San Andreas/MTA/bass_fx.dll b/Shared/data/MTA San Andreas/MTA/bass_fx.dll index 065a596105..3d8184b34a 100644 Binary files a/Shared/data/MTA San Andreas/MTA/bass_fx.dll and b/Shared/data/MTA San Andreas/MTA/bass_fx.dll differ diff --git a/Shared/data/MTA San Andreas/MTA/locale/en_US/client.pot b/Shared/data/MTA San Andreas/MTA/locale/en_US/client.pot index 986344b426..0947cb8c01 100644 --- a/Shared/data/MTA San Andreas/MTA/locale/en_US/client.pot +++ b/Shared/data/MTA San Andreas/MTA/locale/en_US/client.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: MTA San Andreas 1.x\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-08-14 19:10+0000\n" +"POT-Creation-Date: 2024-10-10 20:57+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,6 +18,31 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=INTEGER; plural=EXPRESSION;\n" +#: Client/cefweb/CWebsiteRequests.cpp:19 +msgid "Website requests" +msgstr "" + +#: Client/cefweb/CWebsiteRequests.cpp:27 +msgid "" +"The server requests the following websites in order to load them (later):" +msgstr "" + +#: Client/cefweb/CWebsiteRequests.cpp:33 +msgid "NEVER ENTER SENSITIVE DATA TO PROTECT THEM FROM BEING STOLEN" +msgstr "" + +#: Client/cefweb/CWebsiteRequests.cpp:46 +msgid "Remember decision" +msgstr "" + +#: Client/cefweb/CWebsiteRequests.cpp:51 Client/core/CSettings.cpp:974 +msgid "Allow" +msgstr "" + +#: Client/cefweb/CWebsiteRequests.cpp:57 +msgid "Deny" +msgstr "" + #: Client/mods/deathmatch/CClient.cpp:36 msgid "This version has expired." msgstr "" @@ -133,583 +158,584 @@ msgstr "" msgid "(Development mode) prints world sound ids into the debug window" msgstr "" -#: Client/mods/deathmatch/logic/CLocalServer.cpp:37 -msgid "HOST GAME" +#: Client/mods/deathmatch/logic/CResource.cpp:375 +#: Client/mods/deathmatch/logic/CClientGame.cpp:1089 Client/core/CCore.cpp:674 +#: Client/core/CSettings.cpp:3483 +msgid "In-game" msgstr "" -#. * -#. * Webbrowser tab -#. * -#: Client/mods/deathmatch/logic/CLocalServer.cpp:51 -#: Client/core/CSettings.cpp:442 Client/core/CSettings.cpp:630 -#: Client/core/CSettings.cpp:904 Client/core/CSettings.cpp:2018 -msgid "General" +#: Client/mods/deathmatch/logic/CClientGame.cpp:374 +msgid "Flying a UFO around" msgstr "" -#. m_pTabs->CreateTab ( "Gamemode" ); -#: Client/mods/deathmatch/logic/CLocalServer.cpp:53 -msgid "Resources" +#: Client/mods/deathmatch/logic/CClientGame.cpp:374 +msgid "Cruising around" msgstr "" -#: Client/mods/deathmatch/logic/CLocalServer.cpp:55 -#: Client/mods/deathmatch/logic/CLocalServer.cpp:57 -msgid "Server name:" +#: Client/mods/deathmatch/logic/CClientGame.cpp:374 +msgid "Riding the waves of" msgstr "" -#: Client/mods/deathmatch/logic/CLocalServer.cpp:64 -#: Client/mods/deathmatch/logic/CLocalServer.cpp:66 -msgid "Password:" +#: Client/mods/deathmatch/logic/CClientGame.cpp:375 +msgid "Riding the train in" msgstr "" -#: Client/mods/deathmatch/logic/CLocalServer.cpp:73 -#: Client/mods/deathmatch/logic/CLocalServer.cpp:75 -msgid "Max players:" +#: Client/mods/deathmatch/logic/CClientGame.cpp:375 +msgid "Flying around" msgstr "" -#: Client/mods/deathmatch/logic/CLocalServer.cpp:82 -#: Client/mods/deathmatch/logic/CLocalServer.cpp:84 -msgid "Broadcast:" +#: Client/mods/deathmatch/logic/CClientGame.cpp:376 +msgid "Riding around" msgstr "" -#: Client/mods/deathmatch/logic/CLocalServer.cpp:86 -msgid "LAN" +#: Client/mods/deathmatch/logic/CClientGame.cpp:376 +msgid "Monster truckin' around" msgstr "" -#. Create the tabs -#: Client/mods/deathmatch/logic/CLocalServer.cpp:90 -#: Client/core/ServerBrowser/CServerBrowser.cpp:133 -msgid "Internet" +#: Client/mods/deathmatch/logic/CClientGame.cpp:376 +msgid "Quaddin' around" msgstr "" -#: Client/mods/deathmatch/logic/CLocalServer.cpp:99 -msgid "Selected" +#: Client/mods/deathmatch/logic/CClientGame.cpp:377 +msgid "Bunny hopping around" msgstr "" -#: Client/mods/deathmatch/logic/CLocalServer.cpp:116 -msgid "All" +#: Client/mods/deathmatch/logic/CClientGame.cpp:377 +msgid "Doing weird stuff in" msgstr "" -#: Client/mods/deathmatch/logic/CLocalServer.cpp:118 -msgid "Start" +#: Client/mods/deathmatch/logic/CClientGame.cpp:381 +msgid "Climbing around in" msgstr "" -#. Cancel button -#: Client/mods/deathmatch/logic/CLocalServer.cpp:123 -#: Client/gui/CGUIMessageBox_Impl.cpp:68 Client/core/CSettings.cpp:132 -#: Client/core/CSettings.cpp:4784 Client/core/CVersionUpdater.cpp:1790 -#: Client/core/CVersionUpdater.cpp:1806 Client/core/CVersionUpdater.cpp:1841 -#: Client/loader/Dialogs.cpp:136 -msgid "Cancel" +#: Client/mods/deathmatch/logic/CClientGame.cpp:382 +#: Client/mods/deathmatch/logic/CClientGame.cpp:383 +msgid "Doing a drive-by in" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:506 -msgid "Disconnected: Invalid nickname" +#: Client/mods/deathmatch/logic/CClientGame.cpp:384 +msgid "Blub blub..." msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:510 -msgid "Disconnect from server" +#: Client/mods/deathmatch/logic/CClientGame.cpp:385 +msgid "Breathing water" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:514 -#, c-format -msgid "" -"Disconnected: Serial is banned.\n" -"Reason: %s" +#: Client/mods/deathmatch/logic/CClientGame.cpp:386 +msgid "Drowning in" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:520 -#, c-format -msgid "" -"Disconnected: You are banned.\n" -"Reason: %s" +#: Client/mods/deathmatch/logic/CClientGame.cpp:387 +msgid "Ducking for cover in" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:526 -#, c-format -msgid "" -"Disconnected: Account is banned.\n" -"Reason: %s" +#: Client/mods/deathmatch/logic/CClientGame.cpp:388 +msgid "Fighting in" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:531 -msgid "Disconnected: Version mismatch" +#: Client/mods/deathmatch/logic/CClientGame.cpp:389 +msgid "Throwing fists in" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:535 -msgid "Disconnected: Join flood. Please wait a minute, then reconnect." +#: Client/mods/deathmatch/logic/CClientGame.cpp:390 +msgid "Blastin' fools in" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:539 -#, c-format -msgid "" -"Disconnected: Server from different branch.\n" -"Information: %s" +#: Client/mods/deathmatch/logic/CClientGame.cpp:391 +msgid "Shooting up" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:544 -#, c-format -msgid "" -"Disconnected: Bad version.\n" -"Information: %s" +#: Client/mods/deathmatch/logic/CClientGame.cpp:392 +msgid "Jetpacking in" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:549 -#, c-format -msgid "" -"Disconnected: Server is running a newer build.\n" -"Information: %s" +#: Client/mods/deathmatch/logic/CClientGame.cpp:393 +msgid "Literally on fire in" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:554 -#, c-format -msgid "" -"Disconnected: Server is running an older build.\n" -"Information: %s" +#: Client/mods/deathmatch/logic/CClientGame.cpp:394 +msgid "Burning up in" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:559 -msgid "Disconnected: Nick already in use" +#: Client/mods/deathmatch/logic/CClientGame.cpp:395 +msgid "Swimming in" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:563 -msgid "Disconnected: Player element could not be created." +#: Client/mods/deathmatch/logic/CClientGame.cpp:396 +msgid "Floating around in" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:567 -#, c-format -msgid "Disconnected: Server refused the connection: %s" +#: Client/mods/deathmatch/logic/CClientGame.cpp:397 +msgid "Being chased by a shark" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:572 -msgid "Disconnected: Serial verification failed" +#: Client/mods/deathmatch/logic/CClientGame.cpp:398 +msgid "Choking to death in" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:576 -#, c-format -msgid "Disconnected: Connection desync %s" +#: Client/mods/deathmatch/logic/CClientGame.cpp:533 +#: Client/core/CMainMenu.cpp:304 Client/core/CCore.cpp:674 +#: Client/core/CSettings.cpp:3479 +msgid "Main menu" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:585 -#, c-format -msgid "Disconnected: You were kicked by %s" +#. Show timeout message and disconnect +#. Display an error, reset the error status and exit +#. Show a message that the connection timed out and abort +#. Show failed message and abort the attempt +#: Client/mods/deathmatch/logic/CClientGame.cpp:641 +#: Client/mods/deathmatch/logic/CClientGame.cpp:715 +#: Client/mods/deathmatch/logic/CClientGame.cpp:739 +#: Client/mods/deathmatch/logic/CClientGame.cpp:761 +#: Client/mods/deathmatch/logic/CClientGame.cpp:1174 +#: Client/mods/deathmatch/logic/CClientGame.cpp:1254 +#: Client/mods/deathmatch/logic/CClientGame.cpp:1264 +#: Client/mods/deathmatch/logic/CClientGame.cpp:1333 +#: Client/mods/deathmatch/logic/CClientGame.cpp:1370 +#: Client/mods/deathmatch/logic/CClientGame.cpp:1419 +#: Client/mods/deathmatch/logic/CClientGame.cpp:1431 +#: Client/mods/deathmatch/logic/CResourceFileDownloadManager.cpp:145 +#: Client/loader/MainFunctions.cpp:252 Client/loader/MainFunctions.cpp:267 +#: Client/loader/MainFunctions.cpp:269 Client/loader/MainFunctions.cpp:846 +#: Client/loader/CInstallManager.cpp:552 Client/loader/CInstallManager.cpp:561 +#: Client/core/CGUI.cpp:87 Client/core/CCore.cpp:1275 +#: Client/core/CCore.cpp:1288 Client/core/CSettings.cpp:2941 +#: Client/core/CSettings.cpp:4166 Client/core/CSettings.cpp:4194 +#: Client/core/CSettings.cpp:4764 Client/core/CConnectManager.cpp:80 +#: Client/core/CConnectManager.cpp:111 Client/core/CConnectManager.cpp:127 +#: Client/core/CConnectManager.cpp:263 Client/core/CConnectManager.cpp:321 +#: Client/core/CConnectManager.cpp:404 Client/core/CConnectManager.cpp:411 +#: Client/core/CConnectManager.cpp:421 +#: Client/core/DXHook/CDirect3DHook9.cpp:127 +#: Client/core/ServerBrowser/CServerBrowser.cpp:1285 +#: Client/core/ServerBrowser/CServerBrowser.cpp:1307 +#: Client/core/ServerBrowser/CServerBrowser.cpp:1364 +#: Client/core/ServerBrowser/CServerBrowser.cpp:1413 +#: Shared/mods/deathmatch/logic/CLatentTransferManager.cpp:378 +#: Shared/sdk/SharedUtil.Misc.hpp:137 +msgid "Error" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:590 -#, c-format -msgid "Disconnected: You were banned by %s" +#: Client/mods/deathmatch/logic/CClientGame.cpp:641 +#: Client/mods/deathmatch/logic/CClientGame.cpp:739 +#: Client/core/ServerBrowser/CServerBrowser.cpp:1307 +#: Client/core/ServerBrowser/CServerBrowser.cpp:1364 +msgid "Invalid nickname! Please go to Settings and set a new one!" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:601 -msgid "Disconnected: Server shutdown or restarting" +#. Display the status box +#: Client/mods/deathmatch/logic/CClientGame.cpp:657 +#: Client/core/CConnectManager.cpp:148 +msgid "CONNECTING" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:621 -msgid "You were kicked from the game" +#: Client/mods/deathmatch/logic/CClientGame.cpp:657 +msgid "Entering the game ..." msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:622 -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:633 -msgid "This server requires a non-modifed gta_sa.exe" +#: Client/mods/deathmatch/logic/CClientGame.cpp:715 +msgid "" +"Not connected; please use Quick Connect or the 'connect' command to connect " +"to a server." msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:623 -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:634 -msgid "Please replace gta_sa.exe" +#: Client/mods/deathmatch/logic/CClientGame.cpp:761 +msgid "Could not start the local server. See console for details." msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:624 -msgid "This server does not allow custom D3D9.DLLs" +#: Client/mods/deathmatch/logic/CClientGame.cpp:771 +#: Client/mods/deathmatch/logic/CClientGame.cpp:1243 +msgid "Local Server" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:625 -msgid "Remove D3D9.DLL from your GTA install directory and restart MTA" +#: Client/mods/deathmatch/logic/CClientGame.cpp:771 +msgid "Starting local server ..." msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:626 -msgid "This server does not allow virtual machines" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1019 +msgid "Area 51" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:627 -msgid "This server requires driver signing to be enabled" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1028 +msgid "Walking around " msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:628 -msgid "Please restart your PC" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1174 +#, c-format +msgid "You were kicked from the game ( %s )" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:629 -msgid "This server has detected missing anti-cheat components" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1243 +msgid "Connecting to local server..." msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:630 -msgid "Try restarting MTA" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1254 +msgid "Error connecting to server." msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:631 -msgid "This server requires a non-modifed gta3.img and gta_int.img" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1264 +msgid "Connecting to local server timed out. See console for details." msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:632 -msgid "Please replace gta3.img or gta_int.img" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1333 +#: Client/core/CConnectManager.cpp:263 +msgid "Connection timed out" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:635 -msgid "This server does not allow Wine" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1370 +msgid "Connection with the server was lost" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:636 -msgid "Ensure no other program is modifying MTA:SA" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1381 +#: Client/core/CConnectManager.cpp:277 Client/core/CConnectManager.cpp:281 +msgid "Disconnected: unknown protocol error" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:650 -msgid "Time Remaining: " +#: Client/mods/deathmatch/logic/CClientGame.cpp:1385 +#: Client/core/CConnectManager.cpp:285 +msgid "Disconnected: disconnected remotely" msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:660 -#, c-format -msgid "%d day" -msgid_plural "%d days" -msgstr[0] "" -msgstr[1] "" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1389 +#: Client/core/CConnectManager.cpp:289 +msgid "Disconnected: connection lost remotely" +msgstr "" -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:662 -#, c-format -msgid "%d hour" -msgid_plural "%d hours" -msgstr[0] "" -msgstr[1] "" - -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:664 -#, c-format -msgid "%d minute" -msgid_plural "%d minutes" -msgstr[0] "" -msgstr[1] "" - -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:666 -#, c-format -msgid "%d second" -msgid_plural "%d seconds" -msgstr[0] "" -msgstr[1] "" - -#. Display the error -#: Client/mods/deathmatch/logic/CPacketHandler.cpp:670 -msgid "Disconnected" -msgstr "" - -#: Client/mods/deathmatch/logic/CClientGame.cpp:370 -msgid "Flying a UFO around" -msgstr "" - -#: Client/mods/deathmatch/logic/CClientGame.cpp:370 -msgid "Cruising around" -msgstr "" - -#: Client/mods/deathmatch/logic/CClientGame.cpp:370 -msgid "Riding the waves of" -msgstr "" - -#: Client/mods/deathmatch/logic/CClientGame.cpp:371 -msgid "Riding the train in" -msgstr "" - -#: Client/mods/deathmatch/logic/CClientGame.cpp:371 -msgid "Flying around" -msgstr "" - -#: Client/mods/deathmatch/logic/CClientGame.cpp:372 -msgid "Riding around" -msgstr "" - -#: Client/mods/deathmatch/logic/CClientGame.cpp:372 -msgid "Monster truckin' around" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1393 +#: Client/core/CConnectManager.cpp:293 +msgid "Disconnected: you are banned from this server" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:372 -msgid "Quaddin' around" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1397 +msgid "Disconnected: the server is currently full" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:373 -msgid "Bunny hopping around" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1401 +#: Client/core/CConnectManager.cpp:300 +msgid "Disconnected: disconnected from the server" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:373 -msgid "Doing weird stuff in" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1405 +#: Client/core/CConnectManager.cpp:304 +msgid "Disconnected: connection to the server was lost" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:377 -msgid "Climbing around in" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1409 +msgid "Disconnected: invalid password specified" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:378 -#: Client/mods/deathmatch/logic/CClientGame.cpp:379 -msgid "Doing a drive-by in" +#: Client/mods/deathmatch/logic/CClientGame.cpp:1413 +#: Client/core/CConnectManager.cpp:311 +msgid "Disconnected: connection was refused" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:380 -msgid "Blub blub..." +#: Client/mods/deathmatch/logic/CClientGame.cpp:1431 +msgid "MTA Client verification failed!" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:381 -msgid "Breathing water" +#: Client/mods/deathmatch/logic/CClientGame.cpp:5623 +msgid "In a ditch" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:382 -msgid "Drowning in" +#: Client/mods/deathmatch/logic/CClientGame.cpp:5623 +msgid "En-route to hospital" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:383 -msgid "Ducking for cover in" +#: Client/mods/deathmatch/logic/CClientGame.cpp:5623 +msgid "Meeting their maker" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:384 -msgid "Fighting in" +#: Client/mods/deathmatch/logic/CClientGame.cpp:5624 +msgid "Regretting their decisions" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:385 -msgid "Throwing fists in" +#: Client/mods/deathmatch/logic/CClientGame.cpp:5624 +msgid "Wasted" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:386 -msgid "Blastin' fools in" +#: Client/mods/deathmatch/logic/CTransferBox.cpp:25 +msgid "Map download progress:" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:387 -msgid "Shooting up" +#: Client/mods/deathmatch/logic/CTransferBox.cpp:28 +msgid "Download Progress:" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:388 -msgid "Jetpacking in" +#. Find our largest piece of text, so we can size accordingly +#: Client/mods/deathmatch/logic/CTransferBox.cpp:42 +#: Client/mods/deathmatch/logic/CTransferBox.cpp:105 +#, c-format +msgid "%s of %s" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:389 -msgid "Literally on fire in" +#: Client/mods/deathmatch/logic/CTransferBox.cpp:44 +#: Client/mods/deathmatch/logic/CTransferBox.cpp:65 +msgid "Disconnect to cancel download" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:390 -msgid "Burning up in" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:506 +msgid "Disconnected: Invalid nickname" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:391 -msgid "Swimming in" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:510 +msgid "Disconnect from server" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:392 -msgid "Floating around in" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:514 +#, c-format +msgid "" +"Disconnected: Serial is banned.\n" +"Reason: %s" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:393 -msgid "Being chased by a shark" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:520 +#, c-format +msgid "" +"Disconnected: You are banned.\n" +"Reason: %s" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:394 -msgid "Choking to death in" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:526 +#, c-format +msgid "" +"Disconnected: Account is banned.\n" +"Reason: %s" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:528 -#: Client/core/CSettings.cpp:3479 Client/core/CMainMenu.cpp:304 -#: Client/core/CCore.cpp:674 -msgid "Main menu" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:531 +msgid "Disconnected: Version mismatch" msgstr "" -#. Show timeout message and disconnect -#. Display an error, reset the error status and exit -#. Show a message that the connection timed out and abort -#. Show failed message and abort the attempt -#: Client/mods/deathmatch/logic/CClientGame.cpp:636 -#: Client/mods/deathmatch/logic/CClientGame.cpp:710 -#: Client/mods/deathmatch/logic/CClientGame.cpp:734 -#: Client/mods/deathmatch/logic/CClientGame.cpp:756 -#: Client/mods/deathmatch/logic/CClientGame.cpp:1169 -#: Client/mods/deathmatch/logic/CClientGame.cpp:1249 -#: Client/mods/deathmatch/logic/CClientGame.cpp:1259 -#: Client/mods/deathmatch/logic/CClientGame.cpp:1328 -#: Client/mods/deathmatch/logic/CClientGame.cpp:1365 -#: Client/mods/deathmatch/logic/CClientGame.cpp:1414 -#: Client/mods/deathmatch/logic/CClientGame.cpp:1426 -#: Client/mods/deathmatch/logic/CResourceFileDownloadManager.cpp:145 -#: Client/core/CConnectManager.cpp:80 Client/core/CConnectManager.cpp:111 -#: Client/core/CConnectManager.cpp:127 Client/core/CConnectManager.cpp:263 -#: Client/core/CConnectManager.cpp:321 Client/core/CConnectManager.cpp:404 -#: Client/core/CConnectManager.cpp:411 Client/core/CConnectManager.cpp:421 -#: Client/core/CSettings.cpp:2941 Client/core/CSettings.cpp:4166 -#: Client/core/CSettings.cpp:4194 Client/core/CSettings.cpp:4764 -#: Client/core/CCore.cpp:1275 Client/core/CCore.cpp:1288 -#: Client/core/CGUI.cpp:87 Client/core/DXHook/CDirect3DHook9.cpp:127 -#: Client/core/ServerBrowser/CServerBrowser.cpp:1278 -#: Client/core/ServerBrowser/CServerBrowser.cpp:1300 -#: Client/core/ServerBrowser/CServerBrowser.cpp:1357 -#: Client/core/ServerBrowser/CServerBrowser.cpp:1406 -#: Client/loader/MainFunctions.cpp:252 Client/loader/MainFunctions.cpp:267 -#: Client/loader/MainFunctions.cpp:269 Client/loader/MainFunctions.cpp:846 -#: Client/loader/CInstallManager.cpp:552 Client/loader/CInstallManager.cpp:561 -#: Shared/mods/deathmatch/logic/CLatentTransferManager.cpp:378 -#: Shared/sdk/SharedUtil.Misc.hpp:137 -msgid "Error" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:535 +msgid "Disconnected: Join flood. Please wait a minute, then reconnect." msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:636 -#: Client/mods/deathmatch/logic/CClientGame.cpp:734 -#: Client/core/ServerBrowser/CServerBrowser.cpp:1300 -#: Client/core/ServerBrowser/CServerBrowser.cpp:1357 -msgid "Invalid nickname! Please go to Settings and set a new one!" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:539 +#, c-format +msgid "" +"Disconnected: Server from different branch.\n" +"Information: %s" msgstr "" -#. Display the status box -#: Client/mods/deathmatch/logic/CClientGame.cpp:652 -#: Client/core/CConnectManager.cpp:148 -msgid "CONNECTING" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:544 +#, c-format +msgid "" +"Disconnected: Bad version.\n" +"Information: %s" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:652 -msgid "Entering the game ..." +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:549 +#, c-format +msgid "" +"Disconnected: Server is running a newer build.\n" +"Information: %s" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:710 +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:554 +#, c-format msgid "" -"Not connected; please use Quick Connect or the 'connect' command to connect " -"to a server." +"Disconnected: Server is running an older build.\n" +"Information: %s" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:756 -msgid "Could not start the local server. See console for details." +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:559 +msgid "Disconnected: Nick already in use" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:766 -#: Client/mods/deathmatch/logic/CClientGame.cpp:1238 -msgid "Local Server" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:563 +msgid "Disconnected: Player element could not be created." msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:766 -msgid "Starting local server ..." +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:567 +#, c-format +msgid "Disconnected: Server refused the connection: %s" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1014 -msgid "Area 51" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:572 +msgid "Disconnected: Serial verification failed" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1023 -msgid "Walking around " +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:576 +#, c-format +msgid "Disconnected: Connection desync %s" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1084 -#: Client/mods/deathmatch/logic/CResource.cpp:375 -#: Client/core/CSettings.cpp:3483 Client/core/CCore.cpp:674 -msgid "In-game" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:585 +#, c-format +msgid "Disconnected: You were kicked by %s" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1169 +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:590 #, c-format -msgid "You were kicked from the game ( %s )" +msgid "Disconnected: You were banned by %s" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1238 -msgid "Connecting to local server..." +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:601 +msgid "Disconnected: Server shutdown or restarting" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1249 -msgid "Error connecting to server." +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:621 +msgid "You were kicked from the game" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1259 -msgid "Connecting to local server timed out. See console for details." +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:622 +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:633 +msgid "This server requires a non-modifed gta_sa.exe" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1328 -#: Client/core/CConnectManager.cpp:263 -msgid "Connection timed out" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:623 +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:634 +msgid "Please replace gta_sa.exe" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1365 -msgid "Connection with the server was lost" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:624 +msgid "This server does not allow custom D3D9.DLLs" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1376 -#: Client/core/CConnectManager.cpp:277 Client/core/CConnectManager.cpp:281 -msgid "Disconnected: unknown protocol error" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:625 +msgid "Remove D3D9.DLL from your GTA install directory and restart MTA" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1380 -#: Client/core/CConnectManager.cpp:285 -msgid "Disconnected: disconnected remotely" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:626 +msgid "This server does not allow virtual machines" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1384 -#: Client/core/CConnectManager.cpp:289 -msgid "Disconnected: connection lost remotely" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:627 +msgid "This server requires driver signing to be enabled" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1388 -#: Client/core/CConnectManager.cpp:293 -msgid "Disconnected: you are banned from this server" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:628 +msgid "Please restart your PC" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1392 -msgid "Disconnected: the server is currently full" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:629 +msgid "This server has detected missing anti-cheat components" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1396 -#: Client/core/CConnectManager.cpp:300 -msgid "Disconnected: disconnected from the server" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:630 +msgid "Try restarting MTA" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1400 -#: Client/core/CConnectManager.cpp:304 -msgid "Disconnected: connection to the server was lost" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:631 +msgid "This server requires a non-modifed gta3.img and gta_int.img" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1404 -msgid "Disconnected: invalid password specified" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:632 +msgid "Please replace gta3.img or gta_int.img" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1408 -#: Client/core/CConnectManager.cpp:311 -msgid "Disconnected: connection was refused" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:635 +msgid "This server does not allow Wine" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:1426 -msgid "MTA Client verification failed!" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:636 +msgid "Ensure no other program is modifying MTA:SA" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:5713 -msgid "In a ditch" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:650 +msgid "Time Remaining: " msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:5713 -msgid "En-route to hospital" -msgstr "" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:660 +#, c-format +msgid "%d day" +msgid_plural "%d days" +msgstr[0] "" +msgstr[1] "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:5713 -msgid "Meeting their maker" -msgstr "" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:662 +#, c-format +msgid "%d hour" +msgid_plural "%d hours" +msgstr[0] "" +msgstr[1] "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:5714 -msgid "Regretting their decisions" +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:664 +#, c-format +msgid "%d minute" +msgid_plural "%d minutes" +msgstr[0] "" +msgstr[1] "" + +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:666 +#, c-format +msgid "%d second" +msgid_plural "%d seconds" +msgstr[0] "" +msgstr[1] "" + +#. Display the error +#: Client/mods/deathmatch/logic/CPacketHandler.cpp:670 +msgid "Disconnected" msgstr "" -#: Client/mods/deathmatch/logic/CClientGame.cpp:5714 -msgid "Wasted" +#: Client/mods/deathmatch/logic/CLocalServer.cpp:37 +msgid "HOST GAME" msgstr "" -#: Client/mods/deathmatch/logic/CTransferBox.cpp:25 -msgid "Map download progress:" +#. * +#. * Webbrowser tab +#. * +#: Client/mods/deathmatch/logic/CLocalServer.cpp:51 +#: Client/core/CSettings.cpp:442 Client/core/CSettings.cpp:630 +#: Client/core/CSettings.cpp:904 Client/core/CSettings.cpp:2018 +msgid "General" msgstr "" -#: Client/mods/deathmatch/logic/CTransferBox.cpp:28 -msgid "Download Progress:" +#. m_pTabs->CreateTab ( "Gamemode" ); +#: Client/mods/deathmatch/logic/CLocalServer.cpp:53 +msgid "Resources" msgstr "" -#. Find our largest piece of text, so we can size accordingly -#: Client/mods/deathmatch/logic/CTransferBox.cpp:42 -#: Client/mods/deathmatch/logic/CTransferBox.cpp:105 -#, c-format -msgid "%s of %s" +#: Client/mods/deathmatch/logic/CLocalServer.cpp:55 +#: Client/mods/deathmatch/logic/CLocalServer.cpp:57 +msgid "Server name:" msgstr "" -#: Client/mods/deathmatch/logic/CTransferBox.cpp:44 -#: Client/mods/deathmatch/logic/CTransferBox.cpp:65 -msgid "Disconnect to cancel download" +#: Client/mods/deathmatch/logic/CLocalServer.cpp:64 +#: Client/mods/deathmatch/logic/CLocalServer.cpp:66 +msgid "Password:" +msgstr "" + +#: Client/mods/deathmatch/logic/CLocalServer.cpp:73 +#: Client/mods/deathmatch/logic/CLocalServer.cpp:75 +msgid "Max players:" +msgstr "" + +#: Client/mods/deathmatch/logic/CLocalServer.cpp:82 +#: Client/mods/deathmatch/logic/CLocalServer.cpp:84 +msgid "Broadcast:" +msgstr "" + +#: Client/mods/deathmatch/logic/CLocalServer.cpp:86 +msgid "LAN" +msgstr "" + +#. Create the tabs +#: Client/mods/deathmatch/logic/CLocalServer.cpp:90 +#: Client/core/ServerBrowser/CServerBrowser.cpp:133 +msgid "Internet" +msgstr "" + +#: Client/mods/deathmatch/logic/CLocalServer.cpp:99 +msgid "Selected" +msgstr "" + +#: Client/mods/deathmatch/logic/CLocalServer.cpp:116 +msgid "All" +msgstr "" + +#: Client/mods/deathmatch/logic/CLocalServer.cpp:118 +msgid "Start" +msgstr "" + +#. Cancel button +#: Client/mods/deathmatch/logic/CLocalServer.cpp:123 +#: Client/gui/CGUIMessageBox_Impl.cpp:68 Client/loader/Dialogs.cpp:136 +#: Client/core/CVersionUpdater.cpp:1790 Client/core/CVersionUpdater.cpp:1806 +#: Client/core/CVersionUpdater.cpp:1841 Client/core/CSettings.cpp:132 +#: Client/core/CSettings.cpp:4784 +msgid "Cancel" msgstr "" #. Throw the error and disconnect @@ -718,15 +744,33 @@ msgstr "" msgid "Download error: %s" msgstr "" +#: Client/game_sa/CSettingsSA.cpp:767 +msgid "Can't find valid screen resolution." +msgstr "" + +#. Confirm that res should be used +#: Client/game_sa/CSettingsSA.cpp:843 +msgid "Are you sure you want to use this screen resolution?" +msgstr "" + +#: Client/game_sa/CSettingsSA.cpp:845 Client/loader/Dialogs.cpp:194 +msgid "MTA: San Andreas" +msgstr "" + +#. Couldn't create render target for CPostEffects +#: Client/multiplayer_sa/CMultiplayerSA_CrashFixHacks.cpp:1450 +msgid "Problem with graphics driver" +msgstr "" + #. Create buttons #. OK button -#: Client/gui/CGUIMessageBox_Impl.cpp:64 Client/core/CSettings.cpp:127 -#: Client/core/CSettings.cpp:4785 Client/core/CVersionUpdater.cpp:1607 -#: Client/core/CVersionUpdater.cpp:1823 Client/core/CVersionUpdater.cpp:1916 -#: Client/core/CVersionUpdater.cpp:1938 Client/core/CVersionUpdater.cpp:1956 -#: Client/core/CVersionUpdater.cpp:1968 Client/core/CVersionUpdater.cpp:2120 -#: Client/core/CVersionUpdater.cpp:2129 Client/core/CVersionUpdater.cpp:2138 -#: Client/core/CVersionUpdater.cpp:2152 Client/loader/Dialogs.cpp:133 +#: Client/gui/CGUIMessageBox_Impl.cpp:64 Client/loader/Dialogs.cpp:133 +#: Client/core/CVersionUpdater.cpp:1607 Client/core/CVersionUpdater.cpp:1823 +#: Client/core/CVersionUpdater.cpp:1916 Client/core/CVersionUpdater.cpp:1938 +#: Client/core/CVersionUpdater.cpp:1956 Client/core/CVersionUpdater.cpp:1968 +#: Client/core/CVersionUpdater.cpp:2120 Client/core/CVersionUpdater.cpp:2129 +#: Client/core/CVersionUpdater.cpp:2138 Client/core/CVersionUpdater.cpp:2152 +#: Client/core/CSettings.cpp:127 Client/core/CSettings.cpp:4785 msgid "OK" msgstr "" @@ -736,2549 +780,2506 @@ msgstr "" #. #. #. ///////////////////////////////////////////////////////////////////////// -#: Client/gui/CGUIMessageBox_Impl.cpp:72 Client/core/CQuestionBox.cpp:195 +#: Client/gui/CGUIMessageBox_Impl.cpp:72 Client/loader/Dialogs.cpp:131 +#: Client/core/CVersionUpdater.cpp:1572 Client/core/CVersionUpdater.cpp:1590 +#: Client/core/CVersionUpdater.cpp:1859 Client/core/CVersionUpdater.cpp:1878 +#: Client/core/CQuestionBox.cpp:195 Client/core/CMainMenu.cpp:1200 #: Client/core/CSettings.cpp:1389 Client/core/CSettings.cpp:1413 #: Client/core/CSettings.cpp:4489 Client/core/CSettings.cpp:4563 #: Client/core/CSettings.cpp:4593 Client/core/CSettings.cpp:4642 -#: Client/core/CMainMenu.cpp:1200 Client/core/CVersionUpdater.cpp:1572 -#: Client/core/CVersionUpdater.cpp:1590 Client/core/CVersionUpdater.cpp:1859 -#: Client/core/CVersionUpdater.cpp:1878 -#: Client/core/ServerBrowser/CServerInfo.cpp:479 Client/loader/Dialogs.cpp:131 +#: Client/core/ServerBrowser/CServerInfo.cpp:481 msgid "Yes" msgstr "" -#: Client/core/CCommandFuncs.cpp:24 -msgid "***[ COMMAND HELP ]***\n" +#: Client/loader/Install.cpp:265 +msgid "Unknown" msgstr "" -#: Client/core/CCommandFuncs.cpp:158 +#: Client/loader/Install.cpp:272 #, c-format -msgid "* The time is %d:%02d:%02d" +msgid "" +"The file '%s' is currently locked by %zu processes.\n" +"\n" +"Do you want to terminate the following processes and continue updating?\n" +"\n" +"%s" msgstr "" -#: Client/core/CCommandFuncs.cpp:242 -msgid "connect: Syntax is 'connect [ ]'" +#: Client/loader/Install.cpp:479 +#, c-format +msgid "" +"Your installation may be corrupt now.\n" +"\n" +"%zu out of %zu files could not be restored from the backup.\n" +"\n" +"You should reinstall Multi Theft Auto from www.multitheftauto.com\n" +"or try running the update with administrator rights." msgstr "" -#: Client/core/CCommandFuncs.cpp:250 Client/core/CCommandFuncs.cpp:318 -msgid "connect: Bad port number" +#: Client/loader/Install.cpp:852 Client/loader/Dialogs.cpp:901 +msgid "Installing update..." msgstr "" -#: Client/core/CCommandFuncs.cpp:272 Client/core/CCommandFuncs.cpp:333 -#, c-format -msgid "connect: Connecting to %s:%u..." +#: Client/loader/Install.cpp:934 Client/loader/Dialogs.cpp:909 +msgid "Extracting files..." msgstr "" -#: Client/core/CCommandFuncs.cpp:276 Client/core/CCommandFuncs.cpp:337 -#, c-format -msgid "connect: could not connect to %s:%u!" +#: Client/loader/Utils.cpp:534 Client/loader/Dialogs.cpp:890 +msgid "Searching for Grand Theft Auto San Andreas" msgstr "" -#: Client/core/CCommandFuncs.cpp:281 -msgid "connect: Failed to unload current mod" +#: Client/loader/Utils.cpp:536 Client/loader/Dialogs.cpp:893 +msgid "Please start Grand Theft Auto San Andreas" msgstr "" -#: Client/core/CCommandFuncs.cpp:371 -msgid "Bound all controls from GTA" +#: Client/loader/Utils.cpp:600 +msgid "Select your Grand Theft Auto: San Andreas Installation Directory" msgstr "" -#: Client/core/CCommandFuncs.cpp:385 -msgid "Saved configuration file" +#: Client/loader/Utils.cpp:968 Client/loader/CInstallManager.cpp:361 +#, c-format +msgid "" +"MTA:SA needs Administrator access for the following task:\n" +"\n" +" '%s'\n" +"\n" +"Please confirm in the next window." msgstr "" -#. Print it -#: Client/core/CCommandFuncs.cpp:451 +#: Client/loader/Utils.cpp:1069 #, c-format -msgid "* Your serial is: %s" +msgid "Error loading %s module! (%s)" msgstr "" -#. Unknown command -#: Client/core/CCommands.cpp:223 -msgid "Unknown command or cvar: " +#: Client/loader/Utils.cpp:1394 Client/loader/Dialogs.cpp:914 +msgid "Copying files..." msgstr "" -#. Create window -#: Client/core/CConsole.cpp:417 -msgid "CONSOLE" +#: Client/loader/Utils.cpp:1454 Client/loader/Dialogs.cpp:919 +msgid "Copy finished early. Everything OK." msgstr "" -#: Client/core/CConnectManager.cpp:79 -msgid "Connecting failed. Invalid nick provided!" +#: Client/loader/Utils.cpp:1460 Client/loader/Dialogs.cpp:924 +msgid "Finishing..." msgstr "" -#: Client/core/CConnectManager.cpp:110 -msgid "Connecting failed. Invalid host provided!" +#: Client/loader/Utils.cpp:1462 Client/loader/Dialogs.cpp:928 +msgid "Done!" msgstr "" -#: Client/core/CConnectManager.cpp:126 +#: Client/loader/Utils.cpp:1502 #, c-format -msgid "Connecting to %s at port %u failed!" +msgid "" +"New installation of %s detected.\n" +"\n" +"Do you want to copy your settings from %s ?" msgstr "" -#. Display the status box -#: Client/core/CConnectManager.cpp:147 +#: Client/loader/Utils.cpp:1541 #, c-format -msgid "Connecting to %s:%u ..." +msgid "GTA:SA had trouble opening the file '%s'" msgstr "" -#. Failed loading the mod -#: Client/core/CConnectManager.cpp:403 +#: Client/loader/Utils.cpp:1563 #, c-format -msgid "No such mod installed (%s)" +msgid "GTA:SA is missing the file '%s'." msgstr "" -#: Client/core/CConnectManager.cpp:411 -msgid "Bad server response (2)" +#: Client/loader/Utils.cpp:1588 +msgid "GTA:SA had trouble loading a model." msgstr "" -#: Client/core/CConnectManager.cpp:421 -msgid "Bad server response (1)" +#: Client/loader/Utils.cpp:1590 +msgid "If you recently modified gta3.img, then try reinstalling GTA:SA." msgstr "" -#: Client/core/CQuestionBox.cpp:192 Shared/sdk/SharedUtil.Misc.hpp:688 -msgid "Do you want to see some on-line help about this problem ?" +#: Client/loader/Utils.cpp:1615 +msgid "GTA:SA had trouble adding an upgrade to a vehicle." msgstr "" -#: Client/core/CQuestionBox.cpp:194 Client/core/CSettings.cpp:1388 -#: Client/core/CSettings.cpp:1412 Client/core/CSettings.cpp:4488 -#: Client/core/CSettings.cpp:4562 Client/core/CSettings.cpp:4592 -#: Client/core/CSettings.cpp:4641 Client/core/CMainMenu.cpp:1199 -#: Client/core/CVersionUpdater.cpp:1571 Client/core/CVersionUpdater.cpp:1589 -#: Client/core/CVersionUpdater.cpp:1858 Client/core/CVersionUpdater.cpp:1877 -#: Client/core/ServerBrowser/CServerInfo.cpp:479 Client/loader/Dialogs.cpp:132 -msgid "No" +#: Client/loader/Utils.cpp:1634 +#, c-format +msgid "GTA:SA found errors in the file '%s'" msgstr "" -#: Client/core/CJoystickManager.cpp:1578 -msgid "Accelerate Axis" +#: Client/loader/Utils.cpp:1716 +msgid "Did your computer restart when playing MTA:SA?" msgstr "" -#: Client/core/CJoystickManager.cpp:1580 -msgid "Brake Axis" +#: Client/loader/Utils.cpp:1781 +msgid "Please terminate the following programs before continuing:" msgstr "" -#: Client/core/CKeyBinds.cpp:186 -msgid "Fire" +#: Client/loader/Dialogs.cpp:132 Client/core/CVersionUpdater.cpp:1571 +#: Client/core/CVersionUpdater.cpp:1589 Client/core/CVersionUpdater.cpp:1858 +#: Client/core/CVersionUpdater.cpp:1877 Client/core/CQuestionBox.cpp:194 +#: Client/core/CMainMenu.cpp:1199 Client/core/CSettings.cpp:1388 +#: Client/core/CSettings.cpp:1412 Client/core/CSettings.cpp:4488 +#: Client/core/CSettings.cpp:4562 Client/core/CSettings.cpp:4592 +#: Client/core/CSettings.cpp:4641 Client/core/ServerBrowser/CServerInfo.cpp:481 +msgid "No" msgstr "" -#: Client/core/CKeyBinds.cpp:187 -msgid "Next weapon" +#: Client/loader/Dialogs.cpp:134 +msgid "Quit" msgstr "" -#: Client/core/CKeyBinds.cpp:188 -msgid "Previous weapon" +#: Client/loader/Dialogs.cpp:135 +#: Client/core/ServerBrowser/CServerBrowser.cpp:556 +msgid "Help" msgstr "" -#: Client/core/CKeyBinds.cpp:189 -msgid "Forwards" +#: Client/loader/Dialogs.cpp:151 +msgid "MTA: San Andreas has encountered a problem" msgstr "" -#: Client/core/CKeyBinds.cpp:190 -msgid "Backwards" +#: Client/loader/Dialogs.cpp:152 +msgid "Crash information" msgstr "" -#: Client/core/CKeyBinds.cpp:191 Client/core/CSettings.cpp:2240 -#: Client/core/CSettings.cpp:2268 -msgid "Left" +#: Client/loader/Dialogs.cpp:153 +msgid "" +"Tick the check box to send this crash info to MTA devs using the 'internet'" msgstr "" -#: Client/core/CKeyBinds.cpp:192 Client/core/CSettings.cpp:2242 -#: Client/core/CSettings.cpp:2269 -msgid "Right" +#: Client/loader/Dialogs.cpp:154 +msgid "Doing so will increase the chance of this crash being fixed." msgstr "" -#: Client/core/CKeyBinds.cpp:193 -msgid "Zoom in" +#: Client/loader/Dialogs.cpp:155 +msgid "Do you want to restart MTA: San Andreas ?" msgstr "" -#: Client/core/CKeyBinds.cpp:194 -msgid "Zoom out" +#: Client/loader/Dialogs.cpp:162 +msgid "MTA: San Andreas - Warning" msgstr "" -#: Client/core/CKeyBinds.cpp:195 -msgid "Enter/Exit" +#: Client/loader/Dialogs.cpp:163 +msgid "" +"Your Grand Theft Auto: San Andreas install directory contains these files:" msgstr "" -#: Client/core/CKeyBinds.cpp:196 -msgid "Change camera" +#: Client/loader/Dialogs.cpp:165 +msgid "" +"These files are not required and may interfere with the graphical features " +"in this version of MTA:SA.\n" +"\n" +"It is recommended that you remove or rename these files." msgstr "" -#. 10 -#: Client/core/CKeyBinds.cpp:197 -msgid "Jump" +#: Client/loader/Dialogs.cpp:167 +msgid "Keep these files, but also show this warning on next start" msgstr "" -#: Client/core/CKeyBinds.cpp:198 -msgid "Sprint" +#: Client/loader/Dialogs.cpp:168 +msgid "Do not remind me about these files again" msgstr "" -#: Client/core/CKeyBinds.cpp:199 -msgid "Look behind" +#: Client/loader/Dialogs.cpp:169 +msgid "Rename these files from *.dll to *.dll.bak" msgstr "" -#: Client/core/CKeyBinds.cpp:200 -msgid "Crouch" +#: Client/loader/Dialogs.cpp:170 +msgid "Show me these files" msgstr "" -#: Client/core/CKeyBinds.cpp:201 -msgid "Action" +#: Client/loader/Dialogs.cpp:171 +msgid "Play MTA:SA" msgstr "" -#: Client/core/CKeyBinds.cpp:202 -msgid "Walk" +#: Client/loader/Dialogs.cpp:177 +msgid "MTA: San Andreas - Confusing options" msgstr "" -#: Client/core/CKeyBinds.cpp:203 -msgid "Vehicle fire" +#: Client/loader/Dialogs.cpp:178 +msgid "NVidia Optimus detected!" msgstr "" -#: Client/core/CKeyBinds.cpp:204 -msgid "Vehicle secondary fire" +#: Client/loader/Dialogs.cpp:179 +msgid "Try each option and see what works:" msgstr "" -#: Client/core/CKeyBinds.cpp:205 -msgid "Vehicle left" +#: Client/loader/Dialogs.cpp:180 +msgid "A - Standard NVidia" msgstr "" -#: Client/core/CKeyBinds.cpp:206 -msgid "Vehicle right" +#: Client/loader/Dialogs.cpp:181 +msgid "B - Alternate NVidia" msgstr "" -#. 20 -#: Client/core/CKeyBinds.cpp:207 -msgid "Steer forwards/down" +#: Client/loader/Dialogs.cpp:182 +msgid "C - Standard Intel" msgstr "" -#: Client/core/CKeyBinds.cpp:208 -msgid "Steer backwards/up" +#: Client/loader/Dialogs.cpp:183 +msgid "D - Alternate Intel" msgstr "" -#: Client/core/CKeyBinds.cpp:209 -msgid "Accelerate" +#: Client/loader/Dialogs.cpp:184 +msgid "If you get desperate, this might help:" msgstr "" -#: Client/core/CKeyBinds.cpp:210 -msgid "Brake/Reverse" +#: Client/loader/Dialogs.cpp:185 +msgid "If you have already selected an option that works, this might help:" msgstr "" -#: Client/core/CKeyBinds.cpp:211 -msgid "Radio next" +#: Client/loader/Dialogs.cpp:186 +msgid "Force windowed mode" msgstr "" -#: Client/core/CKeyBinds.cpp:212 -msgid "Radio previous" +#: Client/loader/Dialogs.cpp:187 +msgid "Don't show again" msgstr "" -#: Client/core/CKeyBinds.cpp:213 -msgid "Radio user track skip" +#: Client/loader/Dialogs.cpp:195 +msgid "Warning: Could not detect anti-virus product" msgstr "" -#: Client/core/CKeyBinds.cpp:214 -msgid "Horn" +#: Client/loader/Dialogs.cpp:197 +msgid "" +"MTA could not detect an anti-virus on your PC.\n" +"\n" +"Viruses interfere with MTA and degrade your gameplay experience.\n" +"\n" +"Press 'Help' for more information." msgstr "" -#: Client/core/CKeyBinds.cpp:215 -msgid "Sub-mission" +#: Client/loader/Dialogs.cpp:200 +msgid "I have already installed an anti-virus" msgstr "" -#: Client/core/CKeyBinds.cpp:216 -msgid "Handbrake" +#: Client/loader/Dialogs.cpp:202 +msgid "" +"I will not install an anti-virus.\n" +"I want my PC to lag and be part of a botnet." msgstr "" -#. 30 -#: Client/core/CKeyBinds.cpp:217 -msgid "Vehicle look left" +#: Client/loader/MainFunctions.cpp:248 +msgid "" +"Trouble restarting MTA:SA\n" +"\n" +"If the problem persists, open Task Manager and\n" +"stop the 'gta_sa.exe' and 'Multi Theft Auto.exe' processes\n" +"\n" +"\n" +"Try to launch MTA:SA again?" msgstr "" -#: Client/core/CKeyBinds.cpp:218 -msgid "Vehicle look right" +#: Client/loader/MainFunctions.cpp:266 +msgid "" +"Another instance of MTA is already running.\n" +"\n" +"If this problem persists, please restart your computer" msgstr "" -#: Client/core/CKeyBinds.cpp:219 -msgid "Vehicle look behind" +#: Client/loader/MainFunctions.cpp:269 +msgid "" +"Another instance of MTA is already running.\n" +"\n" +"Do you want to terminate it?" msgstr "" -#: Client/core/CKeyBinds.cpp:220 -msgid "Vehicle mouse look" +#: Client/loader/MainFunctions.cpp:294 +msgid "" +"Are you having problems running MTA:SA?.\n" +"\n" +"Do you want to revert to an earlier version?" msgstr "" -#: Client/core/CKeyBinds.cpp:221 -msgid "Special control left" +#: Client/loader/MainFunctions.cpp:324 +msgid "" +"There seems to be a problem launching MTA:SA.\n" +"Resetting GTA settings can sometimes fix this problem.\n" +"\n" +"Do you want to reset GTA settings now?" msgstr "" -#: Client/core/CKeyBinds.cpp:222 -msgid "Special control right" +#: Client/loader/MainFunctions.cpp:339 +msgid "" +"GTA settings have been reset.\n" +"\n" +"Press OK to continue." msgstr "" -#: Client/core/CKeyBinds.cpp:223 -msgid "Special control down" +#: Client/loader/MainFunctions.cpp:344 +#, c-format +msgid "File could not be deleted: '%s'" msgstr "" -#: Client/core/CKeyBinds.cpp:224 -msgid "Special control up" +#. No settings to delete, or can't find them +#: Client/loader/MainFunctions.cpp:352 +msgid "" +"Are you having problems running MTA:SA?.\n" +"\n" +"Do you want to see some online help?" msgstr "" -#: Client/core/CKeyBinds.cpp:225 -msgid "Aim weapon" +#. Inform user +#: Client/loader/MainFunctions.cpp:388 +msgid "" +"Are you having problems running MTA:SA?.\n" +"\n" +"Do you want to change the following setting?" msgstr "" -#: Client/core/CKeyBinds.cpp:226 -msgid "Conversation yes" +#: Client/loader/MainFunctions.cpp:389 Client/core/CSettings.cpp:662 +#: Client/core/CSettings.cpp:1004 +msgid "Fullscreen mode:" msgstr "" -#. 40 -#: Client/core/CKeyBinds.cpp:227 -msgid "Conversation no" +#: Client/loader/MainFunctions.cpp:389 Client/core/CSettings.cpp:670 +#: Client/core/CSettings.cpp:1615 +msgid "Borderless window" msgstr "" -#: Client/core/CKeyBinds.cpp:228 -msgid "Group control forwards" +#: Client/loader/MainFunctions.cpp:431 +msgid "" +"Are you having problems running MTA:SA?.\n" +"\n" +"Try disabling the following products for GTA and MTA:" msgstr "" -#: Client/core/CKeyBinds.cpp:229 -msgid "Group control backwards" +#: Client/loader/MainFunctions.cpp:465 +msgid "" +"WARNING\n" +"\n" +"MTA:SA has detected unusual activity.\n" +"Please run a virus scan to ensure your system is secure.\n" +"\n" msgstr "" -#. TRANSLATORS: Replace with your language native name -#: Client/core/CLocalization.cpp:16 -msgid "English" +#: Client/loader/MainFunctions.cpp:468 +#, c-format +msgid "The detected file was: %s\n" msgstr "" -#. Create window (with frame) if it will fit inside the screen resolution -#: Client/core/CSettings.cpp:84 -msgid "SETTINGS" +#: Client/loader/MainFunctions.cpp:602 +msgid "" +"An instance of GTA: San Andreas is already running. It needs to be " +"terminated before MTA:SA can be started. Do you want to do that now?" msgstr "" -#: Client/core/CSettings.cpp:116 -msgid "Multiplayer" +#: Client/loader/MainFunctions.cpp:603 Client/loader/MainFunctions.cpp:610 +#: Client/loader/MainFunctions.cpp:1219 +#: Client/core/ServerBrowser/CServerBrowser.cpp:1387 +#: Client/core/ServerBrowser/CServerInfo.cpp:319 +msgid "Information" msgstr "" -#: Client/core/CSettings.cpp:117 -msgid "Video" +#: Client/loader/MainFunctions.cpp:609 +msgid "" +"Unable to terminate GTA: San Andreas. If the problem persists, please " +"restart your computer." msgstr "" -#: Client/core/CSettings.cpp:118 -msgid "Audio" +#: Client/loader/MainFunctions.cpp:632 +msgid "" +"Registry entries are missing. Please reinstall Multi Theft Auto: San Andreas." msgstr "" -#: Client/core/CSettings.cpp:119 -msgid "Binds" +#: Client/loader/MainFunctions.cpp:638 +msgid "" +"The path to your installation of GTA: San Andreas contains unsupported " +"(unicode) characters. Please move your Grand Theft Auto: San Andreas " +"installation to a compatible path that contains only standard ASCII " +"characters and reinstall Multi Theft Auto: San Andreas." msgstr "" -#: Client/core/CSettings.cpp:120 -msgid "Controls" +#: Client/loader/MainFunctions.cpp:648 +msgid "" +"The path to your installation of 'MTA:SA' or 'GTA: San Andreas'\n" +"contains a ';' (semicolon).\n" +"\n" +" If you experience problems when running MTA:SA,\n" +" move your installation(s) to a path that does not contain a semicolon." msgstr "" -#: Client/core/CSettings.cpp:121 -msgid "Interface" +#: Client/loader/MainFunctions.cpp:810 +msgid "" +"Load failed. Please ensure that the latest data files have been installed " +"correctly." msgstr "" -#: Client/core/CSettings.cpp:122 -msgid "Web Browser" +#: Client/loader/MainFunctions.cpp:819 +#, c-format +msgid "Load failed. Please ensure that %s is installed correctly." msgstr "" -#: Client/core/CSettings.cpp:123 -msgid "Advanced" +#: Client/loader/MainFunctions.cpp:826 +#, c-format +msgid "Load failed. Could not find gta_sa.exe in %s." msgstr "" -#: Client/core/CSettings.cpp:147 Client/core/CSettings.cpp:338 -#: Client/core/CSettings.cpp:617 Client/core/CSettings.cpp:889 -msgid "Load defaults" +#: Client/loader/MainFunctions.cpp:836 +#, c-format +msgid "" +"Load failed. %s exists in the GTA directory. Please delete before continuing." msgstr "" -#. * -#. * Controls tab -#. * -#: Client/core/CSettings.cpp:157 Client/core/CSettings.cpp:181 -msgid "Mouse sensitivity:" +#: Client/loader/MainFunctions.cpp:845 +#, c-format +msgid "Main file has an incorrect name (%s)" msgstr "" -#. VerticalAimSensitivity -#: Client/core/CSettings.cpp:157 Client/core/CSettings.cpp:199 -msgid "Vertical aim sensitivity:" +#: Client/loader/MainFunctions.cpp:856 +msgid "" +"Main file is unsigned. Possible virus activity.\n" +"\n" +"See online help if MTA does not work correctly." msgstr "" -#. Mouse Options -#: Client/core/CSettings.cpp:160 -msgid "Mouse options" +#: Client/loader/MainFunctions.cpp:882 +#, c-format +msgid "" +"Data file %s is missing. Possible virus activity.\n" +"\n" +"Consider reinstalling Multi Theft Auto for your security.\n" +"See online help if MTA does not work correctly." msgstr "" -#: Client/core/CSettings.cpp:167 -msgid "Invert mouse vertically" +#: Client/loader/MainFunctions.cpp:893 +#, c-format +msgid "" +"Data file %s is modified. Possible virus activity.\n" +"\n" +"Consider reinstalling Multi Theft Auto for your security.\n" +"See online help if MTA does not work correctly." msgstr "" -#: Client/core/CSettings.cpp:171 -msgid "Steer with mouse" +#: Client/loader/MainFunctions.cpp:907 +msgid "" +".asi files are in the 'MTA:SA' or 'GTA: San Andreas' installation " +"directory.\n" +"\n" +"Remove these .asi files if you experience problems with MTA:SA." msgstr "" -#: Client/core/CSettings.cpp:175 -msgid "Fly with mouse" +#: Client/loader/MainFunctions.cpp:1009 +msgid "" +"File version mismatch error. Reinstall MTA:SA if you experience problems.\n" msgstr "" -#. Joypad options -#: Client/core/CSettings.cpp:217 -msgid "Joypad options" +#: Client/loader/MainFunctions.cpp:1018 +msgid "Some files are missing. Reinstall MTA:SA if you experience problems.\n" msgstr "" -#: Client/core/CSettings.cpp:230 -msgid "Standard controls (Mouse + Keyboard)" +#: Client/loader/MainFunctions.cpp:1030 +msgid "" +"MTA:SA is not compatible with Windows 'Safe Mode'.\n" +"\n" +"Please restart your PC.\n" msgstr "" -#: Client/core/CSettings.cpp:237 -msgid "Classic controls (Joypad)" +#: Client/loader/MainFunctions.cpp:1123 +msgid "Fix configuration issue" msgstr "" -#: Client/core/CSettings.cpp:274 -msgid "Dead Zone" +#. Try to relaunch as admin if not done so already +#: Client/loader/MainFunctions.cpp:1157 +msgid "Fix elevation required error" msgstr "" -#: Client/core/CSettings.cpp:279 -msgid "Saturation" +#: Client/loader/MainFunctions.cpp:1164 +#, c-format +msgid "" +"Could not start Grand Theft Auto: San Andreas. Please try restarting, or if " +"the problem persists,contact MTA at www.multitheftauto.com. \n" +"\n" +"[%s]" msgstr "" -#: Client/core/CSettings.cpp:285 -msgid "Use the 'Binds' tab for joypad buttons." +#: Client/loader/MainFunctions.cpp:1219 +msgid "" +"GTA: San Andreas may not have launched correctly. Do you want to terminate " +"it?" msgstr "" -#: Client/core/CSettings.cpp:324 -msgid "Left Stick" +#: Client/loader/CInstallManager.cpp:376 +#, c-format +msgid "" +"MTA:SA could not complete the following task:\n" +"\n" +" '%s'\n" msgstr "" -#: Client/core/CSettings.cpp:330 -msgid "Right Stick" +#: Client/loader/CInstallManager.cpp:426 +msgid "" +"** The crash was caused by a graphics driver error **\n" +"\n" +"** Please update your graphics drivers **" msgstr "" -#: Client/core/CSettings.cpp:345 -msgid "DESCRIPTION" +#: Client/loader/CInstallManager.cpp:532 +msgid "Install updated MTA:SA files" msgstr "" -#: Client/core/CSettings.cpp:346 -msgid "KEY" +#: Client/loader/CInstallManager.cpp:552 +msgid "" +"Could not update due to file conflicts. Please close other applications and " +"retry" msgstr "" -#: Client/core/CSettings.cpp:348 -msgid "ALT. KEY" +#: Client/loader/CInstallManager.cpp:561 +#, c-format +msgid "Multi Theft Auto has not been installed properly, please reinstall. %s" msgstr "" -#. * -#. * Multiplayer tab -#. * -#: Client/core/CSettings.cpp:353 Client/core/CSettings.cpp:356 -msgid "Nick:" +#: Client/loader/CInstallManager.cpp:613 +msgid "Create GTA:SA junctions" msgstr "" -#: Client/core/CSettings.cpp:378 -msgid "Save server passwords" +#: Client/loader/CInstallManager.cpp:657 +msgid "MTA:SA cannot launch because copying a file failed:" msgstr "" -#: Client/core/CSettings.cpp:383 -msgid "Auto-refresh server browser" +#: Client/loader/CInstallManager.cpp:663 Client/loader/CInstallManager.cpp:703 +msgid "MTA:SA cannot launch because an MTA:SA file is incorrect or missing:" msgstr "" -#: Client/core/CSettings.cpp:388 -msgid "Allow screen upload" +#: Client/loader/CInstallManager.cpp:672 +msgid "Copy MTA:SA files" msgstr "" -#: Client/core/CSettings.cpp:393 -msgid "Allow external sounds" +#: Client/loader/CInstallManager.cpp:695 Client/loader/CInstallManager.cpp:773 +msgid "MTA:SA cannot launch because a GTA:SA file is incorrect or missing:" msgstr "" -#: Client/core/CSettings.cpp:398 -msgid "Always show download window" +#: Client/loader/CInstallManager.cpp:780 +msgid "Patch GTA:SA dependency" msgstr "" -#: Client/core/CSettings.cpp:403 -msgid "Allow connecting with Discord Rich Presence" +#: Client/loader/CInstallManager.cpp:828 +msgid "" +"MTA:SA cannot launch because the GTA:SA executable is incorrect or missing:" msgstr "" -#: Client/core/CSettings.cpp:408 -msgid "Use customized GTA:SA files" +#: Client/loader/CInstallManager.cpp:832 +msgid "" +"Please check your anti-virus for a false-positive detection, try to add an " +"exception for the GTA:SA executable and restart MTA:SA." msgstr "" -#: Client/core/CSettings.cpp:413 -msgid "Map rendering options" +#: Client/loader/CInstallManager.cpp:838 +msgid "Generate GTA:SA" msgstr "" -#: Client/core/CSettings.cpp:419 Client/core/CSettings.cpp:628 -msgid "Opacity:" +#: Client/loader/CInstallManager.cpp:853 +msgid "MTA:SA cannot launch because the GTA:SA executable is not loadable:" msgstr "" -#. * -#. * Audio tab -#. * -#: Client/core/CSettings.cpp:439 Client/core/CSettings.cpp:448 -msgid "Master volume:" +#: Client/loader/CInstallManager.cpp:860 Client/loader/CInstallManager.cpp:883 +msgid "Patch GTA:SA" msgstr "" -#: Client/core/CSettings.cpp:439 Client/core/CSettings.cpp:467 -msgid "Radio volume:" +#: Client/loader/CInstallManager.cpp:876 +msgid "MTA:SA cannot launch because patching GTA:SA has failed:" msgstr "" -#: Client/core/CSettings.cpp:439 Client/core/CSettings.cpp:486 -msgid "SFX volume:" +#: Client/loader/CInstallManager.cpp:1057 Client/core/CCore.cpp:811 +#, c-format +msgid "MTA:SA cannot continue because drive %s does not have enough space." msgstr "" -#: Client/core/CSettings.cpp:439 Client/core/CSettings.cpp:505 -msgid "MTA volume:" +#: Client/loader/CInstallManager.cpp:1113 +msgid "Missing file:" msgstr "" -#: Client/core/CSettings.cpp:440 Client/core/CSettings.cpp:524 -msgid "Voice volume:" +#: Client/loader/CInstallManager.cpp:1117 +msgid "If MTA fails to load, please re-install GTA:SA" msgstr "" -#: Client/core/CSettings.cpp:440 Client/core/CSettings.cpp:565 -msgid "Play mode:" +#: Client/loader/CInstallManager.cpp:1152 +msgid "Update install settings" msgstr "" -#: Client/core/CSettings.cpp:543 -msgid "Radio options" +#: Client/loader/CInstallManager.cpp:1305 +msgid "Update compatibility settings" msgstr "" -#: Client/core/CSettings.cpp:549 -msgid "Radio Equalizer" +#: Client/core/CVersionUpdater.cpp:626 +msgid "Busy" msgstr "" -#: Client/core/CSettings.cpp:554 -msgid "Radio Auto-tune" +#: Client/core/CVersionUpdater.cpp:626 +msgid "Can't check for updates right now" msgstr "" -#: Client/core/CSettings.cpp:559 -msgid "Usertrack options" +#: Client/core/CVersionUpdater.cpp:1567 Client/core/CVersionUpdater.cpp:1587 +#: Client/core/CVersionUpdater.cpp:1605 +#, c-format +msgid "MTA:SA %s required" msgstr "" -#: Client/core/CSettings.cpp:573 Client/core/CSettings.cpp:3087 -msgid "Radio" +#: Client/core/CVersionUpdater.cpp:1568 +#, c-format +msgid "" +"An updated version of MTA:SA %s is required to join the selected server.\n" +"\n" +"Do you want to download and install MTA:SA %s ?" msgstr "" -#: Client/core/CSettings.cpp:574 Client/core/CSettings.cpp:3089 -msgid "Random" +#: Client/core/CVersionUpdater.cpp:1588 +#, c-format +msgid "Do you want to launch MTA:SA %s and connect to this server ?" msgstr "" -#: Client/core/CSettings.cpp:575 Client/core/CSettings.cpp:3091 -msgid "Sequential" +#: Client/core/CVersionUpdater.cpp:1606 +msgid "" +"It is not possible to connect at this time.\n" +"\n" +"Please try later." msgstr "" -#: Client/core/CSettings.cpp:578 -msgid "Automatic Media Scan" +#: Client/core/CVersionUpdater.cpp:1788 +msgid "Connecting" msgstr "" -#: Client/core/CSettings.cpp:585 -msgid "Mute options" +#: Client/core/CVersionUpdater.cpp:1789 Client/core/CVersionUpdater.cpp:1805 +msgid "Please wait..." msgstr "" -#: Client/core/CSettings.cpp:591 -msgid "Mute All sounds when minimized" +#: Client/core/CVersionUpdater.cpp:1804 +msgid "CHECKING" msgstr "" -#: Client/core/CSettings.cpp:596 -msgid "Mute Radio sounds when minimized" -msgstr "" - -#: Client/core/CSettings.cpp:601 -msgid "Mute SFX sounds when minimized" +#: Client/core/CVersionUpdater.cpp:1821 Client/core/CVersionUpdater.cpp:1914 +msgid "UPDATE CHECK" msgstr "" -#: Client/core/CSettings.cpp:606 -msgid "Mute MTA sounds when minimized" +#: Client/core/CVersionUpdater.cpp:1822 +msgid "No update needed" msgstr "" -#: Client/core/CSettings.cpp:611 -msgid "Mute Voice sounds when minimized" +#: Client/core/CVersionUpdater.cpp:1839 +msgid "DOWNLOADING" msgstr "" -#. * -#. * Video tab -#. * -#: Client/core/CSettings.cpp:627 Client/core/CSettings.cpp:636 -msgid "Resolution:" +#: Client/core/CVersionUpdater.cpp:1840 +msgid "waiting..." msgstr "" -#: Client/core/CSettings.cpp:627 Client/core/CSettings.cpp:683 -msgid "FOV:" +#: Client/core/CVersionUpdater.cpp:1856 +msgid "MANDATORY UPDATE" msgstr "" -#: Client/core/CSettings.cpp:627 Client/core/CSettings.cpp:699 -msgid "Draw Distance:" +#: Client/core/CVersionUpdater.cpp:1857 +msgid "" +"To join this server, you must update MTA.\n" +"\n" +" Do you want to update now ?" msgstr "" -#: Client/core/CSettings.cpp:627 Client/core/CSettings.cpp:717 -msgid "Brightness:" +#: Client/core/CVersionUpdater.cpp:1875 +msgid "OPTIONAL UPDATE" msgstr "" -#: Client/core/CSettings.cpp:627 Client/core/CSettings.cpp:735 -msgid "FX Quality:" +#: Client/core/CVersionUpdater.cpp:1876 +msgid "" +"Server says an update is recommended, but not essential.\n" +"\n" +" Do you want to update now ?" msgstr "" -#: Client/core/CSettings.cpp:628 Client/core/CSettings.cpp:749 -msgid "Anisotropic filtering:" +#: Client/core/CVersionUpdater.cpp:1915 +msgid "" +"An update is currently not available.\n" +"\n" +"Please check www.mtasa.com" msgstr "" -#: Client/core/CSettings.cpp:628 Client/core/CSettings.cpp:776 -msgid "Anti-aliasing:" +#: Client/core/CVersionUpdater.cpp:1936 Client/core/CVersionUpdater.cpp:2118 +msgid "ERROR SAVING" msgstr "" -#: Client/core/CSettings.cpp:628 Client/core/CSettings.cpp:790 -msgid "Aspect Ratio:" +#: Client/core/CVersionUpdater.cpp:1937 Client/core/CVersionUpdater.cpp:2119 +msgid "Unable to create the file." msgstr "" -#: Client/core/CSettings.cpp:648 -msgid "Windowed" +#: Client/core/CVersionUpdater.cpp:1945 Client/core/CVersionUpdater.cpp:1954 +#: Client/core/CVersionUpdater.cpp:2127 Client/core/CVersionUpdater.cpp:2136 +msgid "ERROR DOWNLOADING" msgstr "" -#: Client/core/CSettings.cpp:654 -msgid "DPI aware" +#: Client/core/CVersionUpdater.cpp:1946 Client/core/CVersionUpdater.cpp:2128 +msgid "The downloaded file appears to be incorrect." msgstr "" -#: Client/core/CSettings.cpp:662 Client/core/CSettings.cpp:1004 -#: Client/loader/MainFunctions.cpp:389 -msgid "Fullscreen mode:" +#: Client/core/CVersionUpdater.cpp:1955 Client/core/CVersionUpdater.cpp:2137 +msgid "For some reason." msgstr "" -#: Client/core/CSettings.cpp:669 Client/core/CSettings.cpp:1613 -msgid "Standard" +#: Client/core/CVersionUpdater.cpp:1966 Client/core/CVersionUpdater.cpp:2150 +msgid "DOWNLOAD COMPLETE" msgstr "" -#: Client/core/CSettings.cpp:670 Client/core/CSettings.cpp:1615 -#: Client/loader/MainFunctions.cpp:389 -msgid "Borderless window" +#: Client/core/CVersionUpdater.cpp:1990 +msgid " - Unknown problem in _DialogUpdateResult" msgstr "" -#: Client/core/CSettings.cpp:671 Client/core/CSettings.cpp:1617 -msgid "Borderless keep res" +#: Client/core/CVersionUpdater.cpp:2081 Client/core/CSettings.cpp:4590 +msgid "CUSTOMIZED GTA:SA FILES" msgstr "" -#: Client/core/CSettings.cpp:675 -msgid "Mip Mapping" +#: Client/core/CVersionUpdater.cpp:2088 Client/core/CVersionUpdater.cpp:2098 +msgid "Ok" msgstr "" -#: Client/core/CSettings.cpp:743 Client/core/CSettings.cpp:1517 -msgid "Low" +#: Client/core/CVersionUpdater.cpp:2096 +msgid "ERROR" msgstr "" -#: Client/core/CSettings.cpp:744 Client/core/CSettings.cpp:1519 -msgid "Medium" +#: Client/core/CVersionUpdater.cpp:2097 +msgid "" +"Some MTA:SA data files are missing.\n" +"\n" +"\n" +"Please reinstall MTA:SA" msgstr "" -#: Client/core/CSettings.cpp:745 Client/core/CSettings.cpp:1086 -#: Client/core/CSettings.cpp:1521 Client/core/CSettings.cpp:3145 -msgid "High" +#: Client/core/CVersionUpdater.cpp:2774 +#, c-format +msgid "%3d %% completed" msgstr "" -#: Client/core/CSettings.cpp:746 Client/core/CSettings.cpp:1523 -msgid "Very high" +#: Client/core/CVersionUpdater.cpp:2777 +#, c-format +msgid "" +"\n" +"\n" +"Waiting for response - %-3d" msgstr "" -#: Client/core/CSettings.cpp:761 Client/core/CSettings.cpp:784 -#: Client/core/CSettings.cpp:1017 Client/core/CSettings.cpp:1071 -#: Client/core/CSettings.cpp:1201 Client/core/CSettings.cpp:1527 -#: Client/core/CSettings.cpp:3152 Client/core/CSettings.cpp:3184 -#: Client/core/CSettings.cpp:3206 Client/core/CSettings.cpp:4234 -msgid "Off" +#: Client/core/CKeyBinds.cpp:186 +msgid "Fire" msgstr "" -#: Client/core/CSettings.cpp:785 Client/core/CSettings.cpp:1529 -msgid "1x" +#: Client/core/CKeyBinds.cpp:187 +msgid "Next weapon" msgstr "" -#: Client/core/CSettings.cpp:786 Client/core/CSettings.cpp:1531 -msgid "2x" +#: Client/core/CKeyBinds.cpp:188 +msgid "Previous weapon" msgstr "" -#: Client/core/CSettings.cpp:787 Client/core/CSettings.cpp:1533 -msgid "3x" +#: Client/core/CKeyBinds.cpp:189 +msgid "Forwards" msgstr "" -#: Client/core/CSettings.cpp:800 Client/core/CSettings.cpp:1019 -#: Client/core/CSettings.cpp:1539 Client/core/CSettings.cpp:3154 -msgid "Auto" +#: Client/core/CKeyBinds.cpp:190 +msgid "Backwards" msgstr "" -#: Client/core/CSettings.cpp:801 Client/core/CSettings.cpp:1541 -msgid "4:3" +#: Client/core/CKeyBinds.cpp:191 Client/core/CSettings.cpp:2240 +#: Client/core/CSettings.cpp:2268 +msgid "Left" msgstr "" -#: Client/core/CSettings.cpp:802 Client/core/CSettings.cpp:1543 -msgid "16:10" +#: Client/core/CKeyBinds.cpp:192 Client/core/CSettings.cpp:2242 +#: Client/core/CSettings.cpp:2269 +msgid "Right" msgstr "" -#: Client/core/CSettings.cpp:803 Client/core/CSettings.cpp:1545 -msgid "16:9" +#: Client/core/CKeyBinds.cpp:193 +msgid "Zoom in" msgstr "" -#: Client/core/CSettings.cpp:806 -msgid "HUD Match Aspect Ratio" +#: Client/core/CKeyBinds.cpp:194 +msgid "Zoom out" msgstr "" -#: Client/core/CSettings.cpp:812 -msgid "Volumetric Shadows" +#: Client/core/CKeyBinds.cpp:195 +msgid "Enter/Exit" msgstr "" -#: Client/core/CSettings.cpp:816 -msgid "Grass effect" +#: Client/core/CKeyBinds.cpp:196 +msgid "Change camera" msgstr "" -#: Client/core/CSettings.cpp:820 -msgid "Heat haze" +#. 10 +#: Client/core/CKeyBinds.cpp:197 +msgid "Jump" msgstr "" -#: Client/core/CSettings.cpp:824 -msgid "Tyre Smoke etc" +#: Client/core/CKeyBinds.cpp:198 +msgid "Sprint" msgstr "" -#: Client/core/CSettings.cpp:828 -msgid "Dynamic ped shadows" +#: Client/core/CKeyBinds.cpp:199 +msgid "Look behind" msgstr "" -#: Client/core/CSettings.cpp:832 -msgid "Motion blur" +#: Client/core/CKeyBinds.cpp:200 +msgid "Crouch" msgstr "" -#: Client/core/CSettings.cpp:837 -msgid "Full Screen Minimize" +#: Client/core/CKeyBinds.cpp:201 +msgid "Action" msgstr "" -#: Client/core/CSettings.cpp:849 -msgid "Enable Device Selection Dialog" +#: Client/core/CKeyBinds.cpp:202 +msgid "Walk" msgstr "" -#: Client/core/CSettings.cpp:861 -msgid "Show unsafe resolutions" +#: Client/core/CKeyBinds.cpp:203 +msgid "Vehicle fire" msgstr "" -#: Client/core/CSettings.cpp:873 -msgid "Render vehicles always in high detail" +#: Client/core/CKeyBinds.cpp:204 +msgid "Vehicle secondary fire" msgstr "" -#: Client/core/CSettings.cpp:877 -msgid "Render peds always in high detail" +#: Client/core/CKeyBinds.cpp:205 +msgid "Vehicle left" msgstr "" -#: Client/core/CSettings.cpp:881 -msgid "Corona rain reflections" +#: Client/core/CKeyBinds.cpp:206 +msgid "Vehicle right" msgstr "" -#: Client/core/CSettings.cpp:910 -msgid "Enable remote websites" +#. 20 +#: Client/core/CKeyBinds.cpp:207 +msgid "Steer forwards/down" msgstr "" -#: Client/core/CSettings.cpp:915 -msgid "Enable Javascript on remote websites" +#: Client/core/CKeyBinds.cpp:208 +msgid "Steer backwards/up" msgstr "" -#: Client/core/CSettings.cpp:920 -msgid "Custom blacklist" +#: Client/core/CKeyBinds.cpp:209 +msgid "Accelerate" msgstr "" -#: Client/core/CSettings.cpp:931 Client/core/CSettings.cpp:966 -msgid "Enter a domain e.g. google.com" +#: Client/core/CKeyBinds.cpp:210 +msgid "Brake/Reverse" msgstr "" -#: Client/core/CSettings.cpp:939 -msgid "Block" +#: Client/core/CKeyBinds.cpp:211 +msgid "Radio next" msgstr "" -#: Client/core/CSettings.cpp:947 Client/core/CSettings.cpp:982 -msgid "Domain" +#: Client/core/CKeyBinds.cpp:212 +msgid "Radio previous" msgstr "" -#: Client/core/CSettings.cpp:949 Client/core/CSettings.cpp:984 -msgid "Remove domain" +#: Client/core/CKeyBinds.cpp:213 +msgid "Radio user track skip" msgstr "" -#. Reset vecTemp -#: Client/core/CSettings.cpp:955 -msgid "Custom whitelist" +#: Client/core/CKeyBinds.cpp:214 +msgid "Horn" msgstr "" -#: Client/core/CSettings.cpp:974 Client/cefweb/CWebsiteRequests.cpp:51 -msgid "Allow" +#: Client/core/CKeyBinds.cpp:215 +msgid "Sub-mission" msgstr "" -#. Misc section label -#: Client/core/CSettings.cpp:997 -msgid "Misc" +#: Client/core/CKeyBinds.cpp:216 +msgid "Handbrake" msgstr "" -#. Fast clothes loading -#: Client/core/CSettings.cpp:1003 Client/core/CSettings.cpp:1010 -#: Client/core/CSettings.cpp:4803 -msgid "Fast CJ clothes loading:" +#. 30 +#: Client/core/CKeyBinds.cpp:217 +msgid "Vehicle look left" msgstr "" -#. Browser scan speed -#: Client/core/CSettings.cpp:1003 Client/core/CSettings.cpp:1024 -#: Client/core/CSettings.cpp:4805 -msgid "Browser speed:" +#: Client/core/CKeyBinds.cpp:218 +msgid "Vehicle look right" msgstr "" -#. Single download -#: Client/core/CSettings.cpp:1003 Client/core/CSettings.cpp:1038 -#: Client/core/CSettings.cpp:4807 -msgid "Single connection:" +#: Client/core/CKeyBinds.cpp:219 +msgid "Vehicle look behind" msgstr "" -#. Packet tag -#: Client/core/CSettings.cpp:1003 Client/core/CSettings.cpp:1051 -#: Client/core/CSettings.cpp:4809 -msgid "Packet tag:" +#: Client/core/CKeyBinds.cpp:220 +msgid "Vehicle mouse look" msgstr "" -#. Progress animation -#: Client/core/CSettings.cpp:1004 Client/core/CSettings.cpp:1064 -#: Client/core/CSettings.cpp:4811 -msgid "Progress animation:" +#: Client/core/CKeyBinds.cpp:221 +msgid "Special control left" msgstr "" -#. Process priority -#: Client/core/CSettings.cpp:1004 Client/core/CSettings.cpp:1077 -#: Client/core/CSettings.cpp:4801 -msgid "Process priority:" +#: Client/core/CKeyBinds.cpp:222 +msgid "Special control right" msgstr "" -#. Debug setting -#: Client/core/CSettings.cpp:1004 Client/core/CSettings.cpp:1091 -#: Client/core/CSettings.cpp:4813 -msgid "Debug setting:" +#: Client/core/CKeyBinds.cpp:223 +msgid "Special control down" msgstr "" -#. Streaming memory -#: Client/core/CSettings.cpp:1005 Client/core/CSettings.cpp:1114 -#: Client/core/CSettings.cpp:4815 -msgid "Streaming memory:" +#: Client/core/CKeyBinds.cpp:224 +msgid "Special control up" msgstr "" -#. Update build type -#: Client/core/CSettings.cpp:1005 Client/core/CSettings.cpp:1215 -msgid "Update build type:" +#: Client/core/CKeyBinds.cpp:225 +msgid "Aim weapon" msgstr "" -#. UpdateAutoInstall -#: Client/core/CSettings.cpp:1005 Client/core/CSettings.cpp:1194 -msgid "Install important updates:" +#: Client/core/CKeyBinds.cpp:226 +msgid "Conversation yes" msgstr "" -#: Client/core/CSettings.cpp:1018 Client/core/CSettings.cpp:1046 -#: Client/core/CSettings.cpp:1059 Client/core/CSettings.cpp:3156 -#: Client/core/CSettings.cpp:3172 Client/core/CSettings.cpp:3179 -msgid "On" +#. 40 +#: Client/core/CKeyBinds.cpp:227 +msgid "Conversation no" msgstr "" -#: Client/core/CSettings.cpp:1031 Client/core/CSettings.cpp:3161 -msgid "Very slow" +#: Client/core/CKeyBinds.cpp:228 +msgid "Group control forwards" msgstr "" -#: Client/core/CSettings.cpp:1032 Client/core/CSettings.cpp:1045 -#: Client/core/CSettings.cpp:1058 Client/core/CSettings.cpp:1072 -#: Client/core/CSettings.cpp:1098 Client/core/CSettings.cpp:1110 -#: Client/core/CSettings.cpp:1202 Client/core/CSettings.cpp:1222 -#: Client/core/CSettings.cpp:3163 Client/core/CSettings.cpp:3170 -#: Client/core/CSettings.cpp:3177 Client/core/CSettings.cpp:3186 -#: Client/core/CSettings.cpp:3199 -msgid "Default" +#: Client/core/CKeyBinds.cpp:229 +msgid "Group control backwards" msgstr "" -#: Client/core/CSettings.cpp:1033 Client/core/CSettings.cpp:3165 -msgid "Fast" +#: Client/core/CScreenShot.cpp:104 +#, c-format +msgid "Screenshot got %d bytes, but expected %d" msgstr "" -#: Client/core/CSettings.cpp:1084 Client/core/CSettings.cpp:3141 -msgid "Normal" +#: Client/core/CScreenShot.cpp:110 +msgid "Screenshot failed" msgstr "" -#: Client/core/CSettings.cpp:1085 Client/core/CSettings.cpp:3143 -msgid "Above normal" +#: Client/core/CScreenShot.cpp:160 +#, c-format +msgid "Screenshot taken: '%s'" msgstr "" -#: Client/core/CSettings.cpp:1121 -msgid "Min" +#: Client/core/CCommandFuncs.cpp:24 +msgid "***[ COMMAND HELP ]***\n" msgstr "" -#: Client/core/CSettings.cpp:1134 -msgid "Max" +#: Client/core/CCommandFuncs.cpp:158 +#, c-format +msgid "* The time is %d:%02d:%02d" msgstr "" -#. Windows 8 compatibility -#: Client/core/CSettings.cpp:1141 -msgid "Windows 8 compatibility:" +#: Client/core/CCommandFuncs.cpp:242 +msgid "connect: Syntax is 'connect [ ]'" msgstr "" -#: Client/core/CSettings.cpp:1145 -msgid "16-bit color" +#: Client/core/CCommandFuncs.cpp:250 Client/core/CCommandFuncs.cpp:318 +msgid "connect: Bad port number" msgstr "" -#: Client/core/CSettings.cpp:1150 -msgid "Mouse fix" +#: Client/core/CCommandFuncs.cpp:272 Client/core/CCommandFuncs.cpp:333 +#, c-format +msgid "connect: Connecting to %s:%u..." msgstr "" -#. Cache path info -#: Client/core/CSettings.cpp:1168 -msgid "Client resource files:" +#: Client/core/CCommandFuncs.cpp:276 Client/core/CCommandFuncs.cpp:337 +#, c-format +msgid "connect: could not connect to %s:%u!" msgstr "" -#: Client/core/CSettings.cpp:1172 -msgid "Show in Explorer" +#: Client/core/CCommandFuncs.cpp:281 +msgid "connect: Failed to unload current mod" msgstr "" -#. Auto updater section label -#: Client/core/CSettings.cpp:1187 Client/core/CSettings.cpp:1190 -msgid "Auto updater" +#: Client/core/CCommandFuncs.cpp:371 +msgid "Bound all controls from GTA" msgstr "" -#. Check for updates -#: Client/core/CSettings.cpp:1228 -msgid "Check for update now" +#: Client/core/CCommandFuncs.cpp:385 +msgid "Saved configuration file" msgstr "" -#: Client/core/CSettings.cpp:1382 -msgid "Some settings will be changed when you next start MTA" +#. Print it +#: Client/core/CCommandFuncs.cpp:451 +#, c-format +msgid "* Your serial is: %s" msgstr "" -#: Client/core/CSettings.cpp:1383 -msgid "" -"\n" -"\n" -"Do you want to restart now?" +#. Create the window +#: Client/core/CNewsBrowser.cpp:153 +msgid "NEWS" msgstr "" -#: Client/core/CSettings.cpp:1386 -msgid "RESTART REQUIRED" +#. News link +#: Client/core/CNewsBrowser.cpp:171 Client/core/CNewsBrowser.cpp:172 +msgid "Visit latest news article" msgstr "" -#: Client/core/CSettings.cpp:1406 -msgid "Some settings will be changed when you disconnect the current server" +#: Client/core/CQuestionBox.cpp:192 Shared/sdk/SharedUtil.Misc.hpp:688 +msgid "Do you want to see some on-line help about this problem ?" msgstr "" -#: Client/core/CSettings.cpp:1407 -msgid "" -"\n" -"\n" -"Do you want to disconnect now?" +#: Client/core/CJoystickManager.cpp:1578 +msgid "Accelerate Axis" msgstr "" -#: Client/core/CSettings.cpp:1410 -msgid "DISCONNECT REQUIRED" +#: Client/core/CJoystickManager.cpp:1580 +msgid "Brake Axis" msgstr "" -#. Update the joystick name -#: Client/core/CSettings.cpp:1737 -msgid "Joypad not detected - Check connections and restart game" +#. TRANSLATORS: Replace with your language native name +#: Client/core/CLocalization.cpp:16 +msgid "English" msgstr "" -#: Client/core/CSettings.cpp:1932 -msgid "Binding axis" +#. Even the default skin doesn't work, so give up +#: Client/core/CGUI.cpp:86 +msgid "" +"The skin you selected could not be loaded, and the default skin also could " +"not be loaded, please reinstall MTA." msgstr "" -#: Client/core/CSettings.cpp:1932 -msgid "Move an axis to bind, or escape to clear" +#. Unknown command +#: Client/core/CCommands.cpp:223 +msgid "Unknown command or cvar: " msgstr "" -#: Client/core/CSettings.cpp:2009 -msgid "Language:" +#: Client/core/CCredits.cpp:34 +msgid "Programming" msgstr "" -#: Client/core/CSettings.cpp:2009 -msgid "Skin:" +#: Client/core/CCredits.cpp:63 +msgid "Contributors" msgstr "" -#: Client/core/CSettings.cpp:2009 -msgid "Presets:" +#: Client/core/CCredits.cpp:84 +msgid "Game Design / Scripting" msgstr "" -#: Client/core/CSettings.cpp:2058 -msgid "Chat" +#: Client/core/CCredits.cpp:104 +msgid "Language Localization" msgstr "" -#: Client/core/CSettings.cpp:2075 -msgid "Load" +#: Client/core/CCredits.cpp:110 +msgid "Patch contributors" msgstr "" -#: Client/core/CSettings.cpp:2087 -msgid "Colors" +#: Client/core/CCredits.cpp:234 +msgid "Special Thanks" msgstr "" -#: Client/core/CSettings.cpp:2088 -msgid "Layout" +#: Client/core/CCredits.cpp:265 +msgid "" +"This software and project makes use of the following libraries and software:" msgstr "" -#: Client/core/CSettings.cpp:2089 Client/core/CSettings.cpp:2335 -msgid "Options" +#: Client/core/CMainMenu.cpp:333 +msgid "" +"You are using a feature-branch build! This is a test build only which cannot " +"be used to connect to public servers!" msgstr "" -#: Client/core/CSettings.cpp:2095 -msgid "Chat Background" +#: Client/core/CMainMenu.cpp:352 +msgid "" +"MTA will not receive updates on XP/Vista after July 2019.\n" +"\n" +"Upgrade Windows to play on the latest servers." msgstr "" -#: Client/core/CSettings.cpp:2095 -msgid "Chat Text" +#: Client/core/CMainMenu.cpp:1193 +msgid "" +"This will disconnect you from the current server.\n" +"\n" +"Are you sure you want to disconnect?" msgstr "" -#: Client/core/CSettings.cpp:2095 -msgid "Input Background" +#: Client/core/CMainMenu.cpp:1197 +msgid "DISCONNECT WARNING" msgstr "" -#: Client/core/CSettings.cpp:2095 -msgid "Input Text" +#: Client/core/CCore.cpp:813 Shared/mods/deathmatch/logic/Utils.cpp:129 +msgid "Fatal error" msgstr "" -#: Client/core/CSettings.cpp:2118 -msgid "Lines:" +#: Client/core/CCore.cpp:938 +msgid "TO FIX, REMOVE THIS FILE:" msgstr "" -#: Client/core/CSettings.cpp:2118 -msgid "Scale:" +#: Client/core/CCore.cpp:970 +#, c-format +msgid "%s module is incorrect!" msgstr "" -#: Client/core/CSettings.cpp:2118 -msgid "Width:" +#: Client/core/CCore.cpp:1275 +msgid "Error executing URL" msgstr "" -#: Client/core/CSettings.cpp:2121 -msgid "Size" +#: Client/core/CCore.cpp:1287 +#, c-format +msgid "Error running mod specified in command line ('%s')" msgstr "" -#: Client/core/CSettings.cpp:2170 -msgid "after" +#. m_pCommands->Add ( "e", CCommandFuncs::Editor ); +#. m_pCommands->Add ( "clear", CCommandFuncs::Clear ); +#: Client/core/CCore.cpp:1389 +msgid "this help screen" msgstr "" -#: Client/core/CSettings.cpp:2170 -msgid "for" +#: Client/core/CCore.cpp:1390 Client/core/CCore.cpp:1391 +msgid "exits the application" msgstr "" -#: Client/core/CSettings.cpp:2170 -msgid "sec" +#: Client/core/CCore.cpp:1392 +msgid "shows the version" msgstr "" -#: Client/core/CSettings.cpp:2173 -msgid "Fading" +#: Client/core/CCore.cpp:1393 +msgid "shows the time" msgstr "" -#: Client/core/CSettings.cpp:2179 -msgid "Fade out old lines" +#: Client/core/CCore.cpp:1394 +msgid "shows the hud" msgstr "" -#: Client/core/CSettings.cpp:2219 -msgid "Horizontal:" +#: Client/core/CCore.cpp:1395 +msgid "shows all the binds" msgstr "" -#: Client/core/CSettings.cpp:2219 -msgid "Vertical:" +#: Client/core/CCore.cpp:1396 +msgid "shows your serial" msgstr "" -#: Client/core/CSettings.cpp:2219 -msgid "Text-Align:" +#: Client/core/CCore.cpp:1405 +msgid "connects to a server (host port nick pass)" msgstr "" -#: Client/core/CSettings.cpp:2219 -msgid "X-Offset:" +#: Client/core/CCore.cpp:1406 +msgid "connects to a previous server" msgstr "" -#: Client/core/CSettings.cpp:2220 -msgid "Y-Offset:" +#: Client/core/CCore.cpp:1407 +msgid "binds a key (key control)" msgstr "" -#: Client/core/CSettings.cpp:2226 -msgid "Position" +#: Client/core/CCore.cpp:1408 +msgid "unbinds a key (key)" msgstr "" -#: Client/core/CSettings.cpp:2241 Client/core/CSettings.cpp:2255 -msgid "Center" +#: Client/core/CCore.cpp:1409 +msgid "copies the default gta controls" msgstr "" -#: Client/core/CSettings.cpp:2254 -msgid "Top" +#: Client/core/CCore.cpp:1410 +msgid "outputs a screenshot" msgstr "" -#: Client/core/CSettings.cpp:2256 -msgid "Bottom" +#: Client/core/CCore.cpp:1411 +msgid "immediately saves the config" msgstr "" -#: Client/core/CSettings.cpp:2304 -msgid "Font" +#: Client/core/CCore.cpp:1413 +msgid "clears the debug view" msgstr "" -#: Client/core/CSettings.cpp:2341 -msgid "Hide background when not typing" +#: Client/core/CCore.cpp:1414 +msgid "scrolls the chatbox upwards" msgstr "" -#: Client/core/CSettings.cpp:2346 -msgid "Nickname completion using the \"Tab\" key" +#: Client/core/CCore.cpp:1415 +msgid "scrolls the chatbox downwards" msgstr "" -#: Client/core/CSettings.cpp:2351 -msgid "Allow server to flash the window" +#: Client/core/CCore.cpp:1416 +msgid "scrolls the debug view upwards" msgstr "" -#: Client/core/CSettings.cpp:2356 -msgid "Allow tray balloon notifications" +#: Client/core/CCore.cpp:1417 +msgid "scrolls the debug view downwards" msgstr "" -#: Client/core/CSettings.cpp:2361 -msgid "Chat text black/white outline" +#: Client/core/CCore.cpp:1420 +msgid "shows the memory statistics" msgstr "" -#. Create a messagebox to notify the user -#. SString strText = SString::Printf ( "Press a key to bind to '%s'", pItemBind->GetText ().c_str () ); -#. Create a messagebox to notify the user -#. sSString strText = SString::Printf ( "Press a key to bind to '%s'", pItemBind->GetText ().c_str () ); -#: Client/core/CSettings.cpp:2610 Client/core/CSettings.cpp:2617 -msgid "Press a key to bind, or escape to clear" +#: Client/core/CCore.cpp:1421 +msgid "shows the frame timing graph" msgstr "" -#: Client/core/CSettings.cpp:2611 -msgid "Binding a primary key" +#: Client/core/CCore.cpp:1425 +msgid "for developers: reload news" msgstr "" -#: Client/core/CSettings.cpp:2618 -msgid "Binding a secondary key" +#. Create window (with frame) if it will fit inside the screen resolution +#: Client/core/CSettings.cpp:84 +msgid "SETTINGS" msgstr "" -#: Client/core/CSettings.cpp:2694 -msgid "GTA GAME CONTROLS" +#: Client/core/CSettings.cpp:116 +msgid "Multiplayer" msgstr "" -#: Client/core/CSettings.cpp:2696 -msgid "MULTIPLAYER CONTROLS" +#: Client/core/CSettings.cpp:117 +msgid "Video" msgstr "" -#: Client/core/CSettings.cpp:2941 Client/core/CSettings.cpp:4764 -msgid "Your nickname contains invalid characters!" +#: Client/core/CSettings.cpp:118 +msgid "Audio" msgstr "" -#: Client/core/CSettings.cpp:3778 -msgid "Red:" +#: Client/core/CSettings.cpp:119 +msgid "Binds" msgstr "" -#: Client/core/CSettings.cpp:3778 -msgid "Green:" +#: Client/core/CSettings.cpp:120 +msgid "Controls" msgstr "" -#: Client/core/CSettings.cpp:3778 -msgid "Blue:" +#: Client/core/CSettings.cpp:121 +msgid "Interface" msgstr "" -#: Client/core/CSettings.cpp:3778 -msgid "Transparency:" +#: Client/core/CSettings.cpp:122 +msgid "Web Browser" msgstr "" -#: Client/core/CSettings.cpp:3781 -msgid "Color" +#: Client/core/CSettings.cpp:123 +msgid "Advanced" msgstr "" -#: Client/core/CSettings.cpp:3858 -msgid "Preview" +#: Client/core/CSettings.cpp:147 Client/core/CSettings.cpp:338 +#: Client/core/CSettings.cpp:617 Client/core/CSettings.cpp:889 +msgid "Load defaults" msgstr "" -#: Client/core/CSettings.cpp:4166 -msgid "Please disconnect before changing language" +#. * +#. * Controls tab +#. * +#: Client/core/CSettings.cpp:157 Client/core/CSettings.cpp:181 +msgid "Mouse sensitivity:" msgstr "" -#: Client/core/CSettings.cpp:4194 -msgid "Please disconnect before changing skin" +#. VerticalAimSensitivity +#: Client/core/CSettings.cpp:157 Client/core/CSettings.cpp:199 +msgid "Vertical aim sensitivity:" msgstr "" -#: Client/core/CSettings.cpp:4482 -msgid "" -"Volmetric shadows can cause some systems to slow down.\n" -"\n" -"Are you sure you want to enable them?" +#. Mouse Options +#: Client/core/CSettings.cpp:160 +msgid "Mouse options" msgstr "" -#: Client/core/CSettings.cpp:4486 -msgid "PERFORMANCE WARNING" +#: Client/core/CSettings.cpp:167 +msgid "Invert mouse vertically" msgstr "" -#: Client/core/CSettings.cpp:4506 -msgid "" -"Screen upload is required by some servers for anti-cheat purposes.\n" -"\n" -"(The chat box and GUI is excluded from the upload)\n" +#: Client/core/CSettings.cpp:171 +msgid "Steer with mouse" msgstr "" -#: Client/core/CSettings.cpp:4508 -msgid "SCREEN UPLOAD INFORMATION" +#: Client/core/CSettings.cpp:175 +msgid "Fly with mouse" msgstr "" -#: Client/core/CSettings.cpp:4523 -msgid "" -"Some scripts may play sounds, such as radio, from the internet.\n" -"\n" -"Disabling this setting may decrease network\n" -"bandwidth consumption.\n" +#. Joypad options +#: Client/core/CSettings.cpp:217 +msgid "Joypad options" msgstr "" -#: Client/core/CSettings.cpp:4526 -msgid "EXTERNAL SOUNDS" +#: Client/core/CSettings.cpp:230 +msgid "Standard controls (Mouse + Keyboard)" msgstr "" -#: Client/core/CSettings.cpp:4555 -msgid "" -"It seems that you have the Rich Presence connection option enabled.\n" -"Do you want to allow servers to share their data?\n" -"\n" -"This includes yours unique ID identifier." +#: Client/core/CSettings.cpp:237 +msgid "Classic controls (Joypad)" msgstr "" -#: Client/core/CSettings.cpp:4560 -msgid "CONSENT TO ALLOW DATA SHARING" +#: Client/core/CSettings.cpp:274 +msgid "Dead Zone" msgstr "" -#: Client/core/CSettings.cpp:4584 -msgid "" -"Some files in your GTA:SA data directory are customized.\n" -"MTA will only use these modified files if this check box is ticked.\n" -"\n" -"However, CUSTOMIZED GTA:SA FILES ARE BLOCKED BY MANY SERVERS\n" -"\n" -"Are you sure you want to use them?" +#: Client/core/CSettings.cpp:279 +msgid "Saturation" msgstr "" -#: Client/core/CSettings.cpp:4590 Client/core/CVersionUpdater.cpp:2081 -msgid "CUSTOMIZED GTA:SA FILES" +#: Client/core/CSettings.cpp:285 +msgid "Use the 'Binds' tab for joypad buttons." msgstr "" -#: Client/core/CSettings.cpp:4633 -msgid "" -"Enabling DPI awareness is an experimental feature and\n" -"we only recommend it when you play MTA:SA on a scaled monitor.\n" -"You may experience graphical issues if you enable this option.\n" -"\n" -"Are you sure you want to enable this option?" +#: Client/core/CSettings.cpp:324 +msgid "Left Stick" msgstr "" -#: Client/core/CSettings.cpp:4639 -msgid "EXPERIMENTAL FEATURE" +#: Client/core/CSettings.cpp:330 +msgid "Right Stick" msgstr "" -#: Client/core/CSettings.cpp:4782 -msgid "Please enter a nickname" +#: Client/core/CSettings.cpp:345 +msgid "DESCRIPTION" msgstr "" -#: Client/core/CSettings.cpp:4783 -msgid "" -"Please enter a nickname to be used ingame. \n" -"This will be your name when you connect to and play in a server" +#: Client/core/CSettings.cpp:346 +msgid "KEY" msgstr "" -#: Client/core/CSettings.cpp:4801 -msgid "Very experimental feature." +#: Client/core/CSettings.cpp:348 +msgid "ALT. KEY" msgstr "" -#: Client/core/CSettings.cpp:4803 -msgid "Stops stalls with CJ variations (Uses 65MB more RAM)" +#. * +#. * Multiplayer tab +#. * +#: Client/core/CSettings.cpp:353 Client/core/CSettings.cpp:356 +msgid "Nick:" msgstr "" -#: Client/core/CSettings.cpp:4805 -msgid "Older routers may require a slower scan speed." +#: Client/core/CSettings.cpp:378 +msgid "Save server passwords" msgstr "" -#: Client/core/CSettings.cpp:4807 -msgid "Switch on to use only one connection when downloading." +#: Client/core/CSettings.cpp:383 +msgid "Auto-refresh server browser" msgstr "" -#: Client/core/CSettings.cpp:4809 -msgid "Tag network packets to help ISPs identify MTA traffic." +#: Client/core/CSettings.cpp:388 +msgid "Allow screen upload" msgstr "" -#: Client/core/CSettings.cpp:4811 -msgid "Spinning circle animation at the bottom of the screen" +#: Client/core/CSettings.cpp:393 +msgid "Allow external sounds" msgstr "" -#: Client/core/CSettings.cpp:4813 -msgid "Select default always. (This setting is not saved)" -msgstr "" +#: Client/core/CSettings.cpp:398 +msgid "Always show download window" +msgstr "" -#: Client/core/CSettings.cpp:4815 -msgid "Maximum is usually best" +#: Client/core/CSettings.cpp:403 +msgid "Allow connecting with Discord Rich Presence" msgstr "" -#: Client/core/CSettings.cpp:4817 Client/core/CSettings.cpp:4819 -msgid "Auto updater:" +#: Client/core/CSettings.cpp:408 +msgid "Use customized GTA:SA files" msgstr "" -#: Client/core/CSettings.cpp:4817 -msgid "Select default unless you like filling out bug reports." +#: Client/core/CSettings.cpp:413 +msgid "Map rendering options" msgstr "" -#: Client/core/CSettings.cpp:4819 -msgid "Select default to automatically install important updates." +#: Client/core/CSettings.cpp:419 Client/core/CSettings.cpp:628 +msgid "Opacity:" msgstr "" -#: Client/core/CSettings.cpp:4821 -msgid "16-bit color:" +#. * +#. * Audio tab +#. * +#: Client/core/CSettings.cpp:439 Client/core/CSettings.cpp:448 +msgid "Master volume:" msgstr "" -#: Client/core/CSettings.cpp:4821 -msgid "Enable 16 bit color modes - Requires MTA restart" +#: Client/core/CSettings.cpp:439 Client/core/CSettings.cpp:467 +msgid "Radio volume:" msgstr "" -#: Client/core/CSettings.cpp:4823 -msgid "Mouse fix:" +#: Client/core/CSettings.cpp:439 Client/core/CSettings.cpp:486 +msgid "SFX volume:" msgstr "" -#: Client/core/CSettings.cpp:4823 -msgid "Mouse movement fix - May need PC restart" +#: Client/core/CSettings.cpp:439 Client/core/CSettings.cpp:505 +msgid "MTA volume:" msgstr "" -#: Client/core/CMainMenu.cpp:333 -msgid "" -"You are using a feature-branch build! This is a test build only which cannot " -"be used to connect to public servers!" +#: Client/core/CSettings.cpp:440 Client/core/CSettings.cpp:524 +msgid "Voice volume:" msgstr "" -#: Client/core/CMainMenu.cpp:352 -msgid "" -"MTA will not receive updates on XP/Vista after July 2019.\n" -"\n" -"Upgrade Windows to play on the latest servers." +#: Client/core/CSettings.cpp:440 Client/core/CSettings.cpp:565 +msgid "Play mode:" msgstr "" -#: Client/core/CMainMenu.cpp:1193 -msgid "" -"This will disconnect you from the current server.\n" -"\n" -"Are you sure you want to disconnect?" +#: Client/core/CSettings.cpp:543 +msgid "Radio options" msgstr "" -#: Client/core/CMainMenu.cpp:1197 -msgid "DISCONNECT WARNING" +#: Client/core/CSettings.cpp:549 +msgid "Radio Equalizer" msgstr "" -#: Client/core/CScreenShot.cpp:104 -#, c-format -msgid "Screenshot got %d bytes, but expected %d" +#: Client/core/CSettings.cpp:554 +msgid "Radio Auto-tune" msgstr "" -#: Client/core/CScreenShot.cpp:110 -msgid "Screenshot failed" +#: Client/core/CSettings.cpp:559 +msgid "Usertrack options" msgstr "" -#: Client/core/CScreenShot.cpp:160 -#, c-format -msgid "Screenshot taken: '%s'" +#: Client/core/CSettings.cpp:573 Client/core/CSettings.cpp:3087 +msgid "Radio" msgstr "" -#: Client/core/CCore.cpp:811 Client/loader/CInstallManager.cpp:1057 -#, c-format -msgid "MTA:SA cannot continue because drive %s does not have enough space." +#: Client/core/CSettings.cpp:574 Client/core/CSettings.cpp:3089 +msgid "Random" msgstr "" -#: Client/core/CCore.cpp:813 Shared/mods/deathmatch/logic/Utils.cpp:129 -msgid "Fatal error" +#: Client/core/CSettings.cpp:575 Client/core/CSettings.cpp:3091 +msgid "Sequential" msgstr "" -#: Client/core/CCore.cpp:938 -msgid "TO FIX, REMOVE THIS FILE:" +#: Client/core/CSettings.cpp:578 +msgid "Automatic Media Scan" msgstr "" -#: Client/core/CCore.cpp:970 -#, c-format -msgid "%s module is incorrect!" +#: Client/core/CSettings.cpp:585 +msgid "Mute options" msgstr "" -#: Client/core/CCore.cpp:1275 -msgid "Error executing URL" +#: Client/core/CSettings.cpp:591 +msgid "Mute All sounds when minimized" msgstr "" -#: Client/core/CCore.cpp:1287 -#, c-format -msgid "Error running mod specified in command line ('%s')" +#: Client/core/CSettings.cpp:596 +msgid "Mute Radio sounds when minimized" msgstr "" -#. m_pCommands->Add ( "e", CCommandFuncs::Editor ); -#. m_pCommands->Add ( "clear", CCommandFuncs::Clear ); -#: Client/core/CCore.cpp:1389 -msgid "this help screen" +#: Client/core/CSettings.cpp:601 +msgid "Mute SFX sounds when minimized" msgstr "" -#: Client/core/CCore.cpp:1390 Client/core/CCore.cpp:1391 -msgid "exits the application" +#: Client/core/CSettings.cpp:606 +msgid "Mute MTA sounds when minimized" msgstr "" -#: Client/core/CCore.cpp:1392 -msgid "shows the version" +#: Client/core/CSettings.cpp:611 +msgid "Mute Voice sounds when minimized" msgstr "" -#: Client/core/CCore.cpp:1393 -msgid "shows the time" +#. * +#. * Video tab +#. * +#: Client/core/CSettings.cpp:627 Client/core/CSettings.cpp:636 +msgid "Resolution:" msgstr "" -#: Client/core/CCore.cpp:1394 -msgid "shows the hud" +#: Client/core/CSettings.cpp:627 Client/core/CSettings.cpp:683 +msgid "FOV:" msgstr "" -#: Client/core/CCore.cpp:1395 -msgid "shows all the binds" +#: Client/core/CSettings.cpp:627 Client/core/CSettings.cpp:699 +msgid "Draw Distance:" msgstr "" -#: Client/core/CCore.cpp:1396 -msgid "shows your serial" +#: Client/core/CSettings.cpp:627 Client/core/CSettings.cpp:717 +msgid "Brightness:" msgstr "" -#: Client/core/CCore.cpp:1405 -msgid "connects to a server (host port nick pass)" +#: Client/core/CSettings.cpp:627 Client/core/CSettings.cpp:735 +msgid "FX Quality:" msgstr "" -#: Client/core/CCore.cpp:1406 -msgid "connects to a previous server" +#: Client/core/CSettings.cpp:628 Client/core/CSettings.cpp:749 +msgid "Anisotropic filtering:" msgstr "" -#: Client/core/CCore.cpp:1407 -msgid "binds a key (key control)" +#: Client/core/CSettings.cpp:628 Client/core/CSettings.cpp:776 +msgid "Anti-aliasing:" msgstr "" -#: Client/core/CCore.cpp:1408 -msgid "unbinds a key (key)" +#: Client/core/CSettings.cpp:628 Client/core/CSettings.cpp:790 +msgid "Aspect Ratio:" msgstr "" -#: Client/core/CCore.cpp:1409 -msgid "copies the default gta controls" +#: Client/core/CSettings.cpp:648 +msgid "Windowed" msgstr "" -#: Client/core/CCore.cpp:1410 -msgid "outputs a screenshot" +#: Client/core/CSettings.cpp:654 +msgid "DPI aware" msgstr "" -#: Client/core/CCore.cpp:1411 -msgid "immediately saves the config" +#: Client/core/CSettings.cpp:669 Client/core/CSettings.cpp:1613 +msgid "Standard" msgstr "" -#: Client/core/CCore.cpp:1413 -msgid "clears the debug view" +#: Client/core/CSettings.cpp:671 Client/core/CSettings.cpp:1617 +msgid "Borderless keep res" msgstr "" -#: Client/core/CCore.cpp:1414 -msgid "scrolls the chatbox upwards" +#: Client/core/CSettings.cpp:675 +msgid "Mip Mapping" msgstr "" -#: Client/core/CCore.cpp:1415 -msgid "scrolls the chatbox downwards" +#: Client/core/CSettings.cpp:743 Client/core/CSettings.cpp:1517 +msgid "Low" msgstr "" -#: Client/core/CCore.cpp:1416 -msgid "scrolls the debug view upwards" +#: Client/core/CSettings.cpp:744 Client/core/CSettings.cpp:1519 +msgid "Medium" msgstr "" -#: Client/core/CCore.cpp:1417 -msgid "scrolls the debug view downwards" +#: Client/core/CSettings.cpp:745 Client/core/CSettings.cpp:1086 +#: Client/core/CSettings.cpp:1521 Client/core/CSettings.cpp:3145 +msgid "High" msgstr "" -#: Client/core/CCore.cpp:1420 -msgid "shows the memory statistics" +#: Client/core/CSettings.cpp:746 Client/core/CSettings.cpp:1523 +msgid "Very high" msgstr "" -#: Client/core/CCore.cpp:1421 -msgid "shows the frame timing graph" +#: Client/core/CSettings.cpp:761 Client/core/CSettings.cpp:784 +#: Client/core/CSettings.cpp:1017 Client/core/CSettings.cpp:1071 +#: Client/core/CSettings.cpp:1201 Client/core/CSettings.cpp:1527 +#: Client/core/CSettings.cpp:3152 Client/core/CSettings.cpp:3184 +#: Client/core/CSettings.cpp:3206 Client/core/CSettings.cpp:4234 +msgid "Off" msgstr "" -#: Client/core/CCore.cpp:1425 -msgid "for developers: reload news" +#: Client/core/CSettings.cpp:785 Client/core/CSettings.cpp:1529 +msgid "1x" msgstr "" -#. Even the default skin doesn't work, so give up -#: Client/core/CGUI.cpp:86 -msgid "" -"The skin you selected could not be loaded, and the default skin also could " -"not be loaded, please reinstall MTA." +#: Client/core/CSettings.cpp:786 Client/core/CSettings.cpp:1531 +msgid "2x" msgstr "" -#: Client/core/CCredits.cpp:34 -msgid "Programming" +#: Client/core/CSettings.cpp:787 Client/core/CSettings.cpp:1533 +msgid "3x" msgstr "" -#: Client/core/CCredits.cpp:63 -msgid "Contributors" +#: Client/core/CSettings.cpp:800 Client/core/CSettings.cpp:1019 +#: Client/core/CSettings.cpp:1539 Client/core/CSettings.cpp:3154 +msgid "Auto" msgstr "" -#: Client/core/CCredits.cpp:84 -msgid "Game Design / Scripting" +#: Client/core/CSettings.cpp:801 Client/core/CSettings.cpp:1541 +msgid "4:3" msgstr "" -#: Client/core/CCredits.cpp:104 -msgid "Language Localization" +#: Client/core/CSettings.cpp:802 Client/core/CSettings.cpp:1543 +msgid "16:10" msgstr "" -#: Client/core/CCredits.cpp:110 -msgid "Patch contributors" +#: Client/core/CSettings.cpp:803 Client/core/CSettings.cpp:1545 +msgid "16:9" msgstr "" -#: Client/core/CCredits.cpp:234 -msgid "Special Thanks" +#: Client/core/CSettings.cpp:806 +msgid "HUD Match Aspect Ratio" msgstr "" -#: Client/core/CCredits.cpp:265 -msgid "" -"This software and project makes use of the following libraries and software:" +#: Client/core/CSettings.cpp:812 +msgid "Volumetric Shadows" msgstr "" -#. Create the window -#: Client/core/CNewsBrowser.cpp:153 -msgid "NEWS" +#: Client/core/CSettings.cpp:816 +msgid "Grass effect" msgstr "" -#. News link -#: Client/core/CNewsBrowser.cpp:171 Client/core/CNewsBrowser.cpp:172 -msgid "Visit latest news article" +#: Client/core/CSettings.cpp:820 +msgid "Heat haze" msgstr "" -#: Client/core/CVersionUpdater.cpp:626 -msgid "Busy" +#: Client/core/CSettings.cpp:824 +msgid "Tyre Smoke etc" msgstr "" -#: Client/core/CVersionUpdater.cpp:626 -msgid "Can't check for updates right now" +#: Client/core/CSettings.cpp:828 +msgid "Dynamic ped shadows" msgstr "" -#: Client/core/CVersionUpdater.cpp:1567 Client/core/CVersionUpdater.cpp:1587 -#: Client/core/CVersionUpdater.cpp:1605 -#, c-format -msgid "MTA:SA %s required" +#: Client/core/CSettings.cpp:832 +msgid "Motion blur" msgstr "" -#: Client/core/CVersionUpdater.cpp:1568 -#, c-format -msgid "" -"An updated version of MTA:SA %s is required to join the selected server.\n" -"\n" -"Do you want to download and install MTA:SA %s ?" +#: Client/core/CSettings.cpp:837 +msgid "Full Screen Minimize" msgstr "" -#: Client/core/CVersionUpdater.cpp:1588 -#, c-format -msgid "Do you want to launch MTA:SA %s and connect to this server ?" +#: Client/core/CSettings.cpp:849 +msgid "Enable Device Selection Dialog" msgstr "" -#: Client/core/CVersionUpdater.cpp:1606 -msgid "" -"It is not possible to connect at this time.\n" -"\n" -"Please try later." +#: Client/core/CSettings.cpp:861 +msgid "Show unsafe resolutions" msgstr "" -#: Client/core/CVersionUpdater.cpp:1788 -msgid "Connecting" +#: Client/core/CSettings.cpp:873 +msgid "Render vehicles always in high detail" msgstr "" -#: Client/core/CVersionUpdater.cpp:1789 Client/core/CVersionUpdater.cpp:1805 -msgid "Please wait..." +#: Client/core/CSettings.cpp:877 +msgid "Render peds always in high detail" msgstr "" -#: Client/core/CVersionUpdater.cpp:1804 -msgid "CHECKING" +#: Client/core/CSettings.cpp:881 +msgid "Corona rain reflections" msgstr "" -#: Client/core/CVersionUpdater.cpp:1821 Client/core/CVersionUpdater.cpp:1914 -msgid "UPDATE CHECK" +#: Client/core/CSettings.cpp:910 +msgid "Enable remote websites" msgstr "" -#: Client/core/CVersionUpdater.cpp:1822 -msgid "No update needed" +#: Client/core/CSettings.cpp:915 +msgid "Enable Javascript on remote websites" msgstr "" -#: Client/core/CVersionUpdater.cpp:1839 -msgid "DOWNLOADING" +#: Client/core/CSettings.cpp:920 +msgid "Custom blacklist" msgstr "" -#: Client/core/CVersionUpdater.cpp:1840 -msgid "waiting..." +#: Client/core/CSettings.cpp:931 Client/core/CSettings.cpp:966 +msgid "Enter a domain e.g. google.com" msgstr "" -#: Client/core/CVersionUpdater.cpp:1856 -msgid "MANDATORY UPDATE" +#: Client/core/CSettings.cpp:939 +msgid "Block" msgstr "" -#: Client/core/CVersionUpdater.cpp:1857 -msgid "" -"To join this server, you must update MTA.\n" -"\n" -" Do you want to update now ?" +#: Client/core/CSettings.cpp:947 Client/core/CSettings.cpp:982 +msgid "Domain" msgstr "" -#: Client/core/CVersionUpdater.cpp:1875 -msgid "OPTIONAL UPDATE" +#: Client/core/CSettings.cpp:949 Client/core/CSettings.cpp:984 +msgid "Remove domain" msgstr "" -#: Client/core/CVersionUpdater.cpp:1876 -msgid "" -"Server says an update is recommended, but not essential.\n" -"\n" -" Do you want to update now ?" +#. Reset vecTemp +#: Client/core/CSettings.cpp:955 +msgid "Custom whitelist" msgstr "" -#: Client/core/CVersionUpdater.cpp:1915 -msgid "" -"Update not currently avalable.\n" -"\n" -"Please check www.mtasa.com" +#. Misc section label +#: Client/core/CSettings.cpp:997 +msgid "Misc" msgstr "" -#: Client/core/CVersionUpdater.cpp:1936 Client/core/CVersionUpdater.cpp:2118 -msgid "ERROR SAVING" +#. Fast clothes loading +#: Client/core/CSettings.cpp:1003 Client/core/CSettings.cpp:1010 +#: Client/core/CSettings.cpp:4803 +msgid "Fast CJ clothes loading:" msgstr "" -#: Client/core/CVersionUpdater.cpp:1937 Client/core/CVersionUpdater.cpp:2119 -msgid "Unable to create the file." +#. Browser scan speed +#: Client/core/CSettings.cpp:1003 Client/core/CSettings.cpp:1024 +#: Client/core/CSettings.cpp:4805 +msgid "Browser speed:" msgstr "" -#: Client/core/CVersionUpdater.cpp:1945 Client/core/CVersionUpdater.cpp:1954 -#: Client/core/CVersionUpdater.cpp:2127 Client/core/CVersionUpdater.cpp:2136 -msgid "ERROR DOWNLOADING" +#. Single download +#: Client/core/CSettings.cpp:1003 Client/core/CSettings.cpp:1038 +#: Client/core/CSettings.cpp:4807 +msgid "Single connection:" msgstr "" -#: Client/core/CVersionUpdater.cpp:1946 Client/core/CVersionUpdater.cpp:2128 -msgid "The downloaded file appears to be incorrect." +#. Packet tag +#: Client/core/CSettings.cpp:1003 Client/core/CSettings.cpp:1051 +#: Client/core/CSettings.cpp:4809 +msgid "Packet tag:" msgstr "" -#: Client/core/CVersionUpdater.cpp:1955 Client/core/CVersionUpdater.cpp:2137 -msgid "For some reason." +#. Progress animation +#: Client/core/CSettings.cpp:1004 Client/core/CSettings.cpp:1064 +#: Client/core/CSettings.cpp:4811 +msgid "Progress animation:" msgstr "" -#: Client/core/CVersionUpdater.cpp:1966 Client/core/CVersionUpdater.cpp:2150 -msgid "DOWNLOAD COMPLETE" +#. Process priority +#: Client/core/CSettings.cpp:1004 Client/core/CSettings.cpp:1077 +#: Client/core/CSettings.cpp:4801 +msgid "Process priority:" msgstr "" -#: Client/core/CVersionUpdater.cpp:1990 -msgid " - Unknown problem in _DialogUpdateResult" +#. Debug setting +#: Client/core/CSettings.cpp:1004 Client/core/CSettings.cpp:1091 +#: Client/core/CSettings.cpp:4813 +msgid "Debug setting:" msgstr "" -#: Client/core/CVersionUpdater.cpp:2088 Client/core/CVersionUpdater.cpp:2098 -msgid "Ok" +#. Streaming memory +#: Client/core/CSettings.cpp:1005 Client/core/CSettings.cpp:1114 +#: Client/core/CSettings.cpp:4815 +msgid "Streaming memory:" msgstr "" -#: Client/core/CVersionUpdater.cpp:2096 -msgid "ERROR" +#. Update build type +#: Client/core/CSettings.cpp:1005 Client/core/CSettings.cpp:1215 +msgid "Update build type:" msgstr "" -#: Client/core/CVersionUpdater.cpp:2097 -msgid "" -"Some MTA:SA data files are missing.\n" -"\n" -"\n" -"Please reinstall MTA:SA" +#. UpdateAutoInstall +#: Client/core/CSettings.cpp:1005 Client/core/CSettings.cpp:1194 +msgid "Install important updates:" msgstr "" -#: Client/core/CVersionUpdater.cpp:2774 -#, c-format -msgid "%3d %% completed" +#: Client/core/CSettings.cpp:1018 Client/core/CSettings.cpp:1046 +#: Client/core/CSettings.cpp:1059 Client/core/CSettings.cpp:3156 +#: Client/core/CSettings.cpp:3172 Client/core/CSettings.cpp:3179 +msgid "On" msgstr "" -#: Client/core/CVersionUpdater.cpp:2777 -#, c-format -msgid "" -"\n" -"\n" -"Waiting for response - %-3d" +#: Client/core/CSettings.cpp:1031 Client/core/CSettings.cpp:3161 +msgid "Very slow" msgstr "" -#: Client/core/DXHook/CDirect3DHook9.cpp:124 -msgid "" -"Could not initialize Direct3D9.\n" -"\n" -"Please ensure the DirectX End-User Runtime and\n" -"latest Windows Service Packs are installed correctly." +#: Client/core/CSettings.cpp:1032 Client/core/CSettings.cpp:1045 +#: Client/core/CSettings.cpp:1058 Client/core/CSettings.cpp:1072 +#: Client/core/CSettings.cpp:1098 Client/core/CSettings.cpp:1110 +#: Client/core/CSettings.cpp:1202 Client/core/CSettings.cpp:1222 +#: Client/core/CSettings.cpp:3163 Client/core/CSettings.cpp:3170 +#: Client/core/CSettings.cpp:3177 Client/core/CSettings.cpp:3186 +#: Client/core/CSettings.cpp:3199 +msgid "Default" msgstr "" -#. Create the window -#: Client/core/ServerBrowser/CServerBrowser.cpp:85 -msgid "SERVER BROWSER" +#: Client/core/CSettings.cpp:1033 Client/core/CSettings.cpp:3165 +msgid "Fast" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:134 -msgid "Local" +#: Client/core/CSettings.cpp:1084 Client/core/CSettings.cpp:3141 +msgid "Normal" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:135 -msgid "Favourites" +#: Client/core/CSettings.cpp:1085 Client/core/CSettings.cpp:3143 +msgid "Above normal" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:136 -msgid "Recent" +#: Client/core/CSettings.cpp:1121 +msgid "Min" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:191 -msgid "" -"FOR QUICK CONNECT:\n" -"\n" -"Type the address and port into the address bar.\n" -"Or select a server from the history list and press 'Connect'" +#: Client/core/CSettings.cpp:1134 +msgid "Max" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:203 -msgid "HELP" +#. Windows 8 compatibility +#: Client/core/CSettings.cpp:1141 +msgid "Windows 8 compatibility:" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:212 -#: Client/core/ServerBrowser/CServerBrowser.cpp:252 -msgid "Refresh" +#: Client/core/CSettings.cpp:1145 +msgid "16-bit color" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:212 -#: Client/core/ServerBrowser/CServerBrowser.cpp:253 -msgid "Add Favorite" +#: Client/core/CSettings.cpp:1150 +msgid "Mouse fix" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:212 -#: Client/core/ServerBrowser/CServerBrowser.cpp:254 -#: Client/core/ServerBrowser/CServerBrowser.cpp:301 -#: Client/core/ServerBrowser/CServerBrowser.cpp:372 -msgid "Connect" +#. Cache path info +#: Client/core/CSettings.cpp:1168 +msgid "Client resource files:" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:212 -#: Client/core/ServerBrowser/CServerBrowser.cpp:255 -msgid "Server information" +#: Client/core/CSettings.cpp:1172 +msgid "Show in Explorer" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:213 -#: Client/core/ServerBrowser/CServerBrowser.cpp:256 -msgid "Search servers" +#. Auto updater section label +#: Client/core/CSettings.cpp:1187 Client/core/CSettings.cpp:1190 +msgid "Auto updater" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:213 -#: Client/core/ServerBrowser/CServerBrowser.cpp:257 -msgid "Search players" +#. Check for updates +#: Client/core/CSettings.cpp:1228 +msgid "Check for update now" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:213 -#: Client/core/ServerBrowser/CServerBrowser.cpp:258 -msgid "Start search" +#: Client/core/CSettings.cpp:1382 +msgid "Some settings will be changed when you next start MTA" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:299 -#: Client/core/ServerBrowser/CServerBrowser.cpp:1697 -msgid "Search players..." +#: Client/core/CSettings.cpp:1383 +msgid "" +"\n" +"\n" +"Do you want to restart now?" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:422 -#: Client/core/ServerBrowser/CServerBrowser.cpp:1695 -msgid "Search servers..." +#: Client/core/CSettings.cpp:1386 +msgid "RESTART REQUIRED" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:453 -msgid "Name" +#: Client/core/CSettings.cpp:1406 +msgid "Some settings will be changed when you disconnect the current server" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:454 -msgid "Players" +#: Client/core/CSettings.cpp:1407 +msgid "" +"\n" +"\n" +"Do you want to disconnect now?" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:455 -msgid "Ping" +#: Client/core/CSettings.cpp:1410 +msgid "DISCONNECT REQUIRED" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:456 -msgid "Gamemode" +#. Update the joystick name +#: Client/core/CSettings.cpp:1737 +msgid "Joypad not detected - Check connections and restart game" msgstr "" -#. Player List Columns -#. Column for player names -#: Client/core/ServerBrowser/CServerBrowser.cpp:478 -#: Client/core/ServerBrowser/CServerInfo.cpp:138 -msgid "Player list" +#: Client/core/CSettings.cpp:1932 +msgid "Binding axis" msgstr "" -#. Include label -#: Client/core/ServerBrowser/CServerBrowser.cpp:486 -msgid "Include:" +#: Client/core/CSettings.cpp:1932 +msgid "Move an axis to bind, or escape to clear" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:492 -msgid "Empty" +#: Client/core/CSettings.cpp:2009 +msgid "Language:" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:498 -msgid "Full" +#: Client/core/CSettings.cpp:2009 +msgid "Skin:" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:504 -msgid "Locked" +#: Client/core/CSettings.cpp:2009 +msgid "Presets:" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:516 -msgid "Offline" +#: Client/core/CSettings.cpp:2058 +msgid "Chat" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:529 -msgid "Other Versions" +#: Client/core/CSettings.cpp:2075 +msgid "Load" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:550 -msgid "Back" +#: Client/core/CSettings.cpp:2087 +msgid "Colors" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:556 -#: Client/loader/Dialogs.cpp:135 -msgid "Help" +#: Client/core/CSettings.cpp:2088 +msgid "Layout" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:741 -msgid "Loading..." +#: Client/core/CSettings.cpp:2089 Client/core/CSettings.cpp:2335 +msgid "Options" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:1240 -#: Client/core/ServerBrowser/CServerBrowser.cpp:2182 -msgid " ..loading.." +#: Client/core/CSettings.cpp:2095 +msgid "Chat Background" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:1278 -#: Client/core/ServerBrowser/CServerBrowser.cpp:1406 -msgid "No address specified!" +#: Client/core/CSettings.cpp:2095 +msgid "Chat Text" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:1291 -msgid "Unknown protocol" +#: Client/core/CSettings.cpp:2095 +msgid "Input Background" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:1291 -msgid "Please use the mtasa:// protocol!" +#: Client/core/CSettings.cpp:2095 +msgid "Input Text" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:1380 -#: Client/core/ServerBrowser/CServerInfo.cpp:319 -#: Client/loader/MainFunctions.cpp:603 Client/loader/MainFunctions.cpp:610 -#: Client/loader/MainFunctions.cpp:1219 -msgid "Information" +#: Client/core/CSettings.cpp:2118 +msgid "Lines:" msgstr "" -#: Client/core/ServerBrowser/CServerBrowser.cpp:1380 -msgid "You have to select a server to connect to." +#: Client/core/CSettings.cpp:2118 +msgid "Scale:" msgstr "" -#. Create queue window -#: Client/core/ServerBrowser/CServerInfo.cpp:32 -#: Client/core/ServerBrowser/CServerInfo.cpp:302 -msgid "SERVER IS FULL" +#: Client/core/CSettings.cpp:2118 +msgid "Width:" msgstr "" -#. Determine our label draw position for L10n -#. Start position -#. Server Name -#: Client/core/ServerBrowser/CServerInfo.cpp:44 -#: Client/core/ServerBrowser/CServerInfo.cpp:53 -msgid "Name:" +#: Client/core/CSettings.cpp:2121 +msgid "Size" msgstr "" -#. Server IP -#: Client/core/ServerBrowser/CServerInfo.cpp:44 -#: Client/core/ServerBrowser/CServerInfo.cpp:64 -msgid "Server Address:" +#: Client/core/CSettings.cpp:2170 +msgid "after" msgstr "" -#. Gamemode -#: Client/core/ServerBrowser/CServerInfo.cpp:44 -#: Client/core/ServerBrowser/CServerInfo.cpp:75 -msgid "Gamemode:" +#: Client/core/CSettings.cpp:2170 +msgid "for" msgstr "" -#. Map -#: Client/core/ServerBrowser/CServerInfo.cpp:44 -#: Client/core/ServerBrowser/CServerInfo.cpp:86 -msgid "Map:" +#: Client/core/CSettings.cpp:2170 +msgid "sec" msgstr "" -#. Players -#: Client/core/ServerBrowser/CServerInfo.cpp:45 -#: Client/core/ServerBrowser/CServerInfo.cpp:97 -msgid "Players:" +#: Client/core/CSettings.cpp:2173 +msgid "Fading" msgstr "" -#. Passworded -#: Client/core/ServerBrowser/CServerInfo.cpp:45 -#: Client/core/ServerBrowser/CServerInfo.cpp:108 -msgid "Passworded:" +#: Client/core/CSettings.cpp:2179 +msgid "Fade out old lines" msgstr "" -#. Latency -#: Client/core/ServerBrowser/CServerInfo.cpp:45 -#: Client/core/ServerBrowser/CServerInfo.cpp:119 -msgid "Latency:" +#: Client/core/CSettings.cpp:2219 +msgid "Horizontal:" msgstr "" -#. Close button -#: Client/core/ServerBrowser/CServerInfo.cpp:144 -msgid "Close" +#: Client/core/CSettings.cpp:2219 +msgid "Vertical:" msgstr "" -#. Join Game button -#: Client/core/ServerBrowser/CServerInfo.cpp:152 -msgid "Join Game" +#: Client/core/CSettings.cpp:2219 +msgid "Text-Align:" msgstr "" -#. Please enter password label -#: Client/core/ServerBrowser/CServerInfo.cpp:166 -msgid "Please enter the password to the server:" +#: Client/core/CSettings.cpp:2219 +msgid "X-Offset:" msgstr "" -#: Client/core/ServerBrowser/CServerInfo.cpp:177 -msgid "Join the server as soon as a player slot is available." +#: Client/core/CSettings.cpp:2220 +msgid "Y-Offset:" msgstr "" -#: Client/core/ServerBrowser/CServerInfo.cpp:310 -msgid "PLEASE ENTER SERVER PASSWORD" +#: Client/core/CSettings.cpp:2226 +msgid "Position" msgstr "" -#. The server has timed out -#: Client/core/ServerBrowser/CServerInfo.cpp:402 -msgid "Timed Out" +#: Client/core/CSettings.cpp:2241 Client/core/CSettings.cpp:2255 +msgid "Center" msgstr "" -#. Set every GUI elements text to blank -#: Client/core/ServerBrowser/CServerInfo.cpp:431 -msgid "Querying..." +#: Client/core/CSettings.cpp:2254 +msgid "Top" msgstr "" -#: Client/core/ServerBrowser/CServerList.cpp:25 -msgid "Idle" +#: Client/core/CSettings.cpp:2256 +msgid "Bottom" msgstr "" -#: Client/core/ServerBrowser/CServerList.cpp:150 -msgid "player" -msgid_plural "players" -msgstr[0] "" -msgstr[1] "" - -#: Client/core/ServerBrowser/CServerList.cpp:151 -msgid "on" +#: Client/core/CSettings.cpp:2304 +msgid "Font" msgstr "" -#: Client/core/ServerBrowser/CServerList.cpp:154 -msgid "server" -msgid_plural "servers" -msgstr[0] "" -msgstr[1] "" +#: Client/core/CSettings.cpp:2341 +msgid "Hide background when not typing" +msgstr "" -#. We are polling for the master server list (first pass) -#: Client/core/ServerBrowser/CServerList.cpp:238 -#, c-format -msgid "Requesting master server list (%lu ms elapsed)" +#: Client/core/CSettings.cpp:2346 +msgid "Nickname completion using the \"Tab\" key" msgstr "" -#. Abort -#: Client/core/ServerBrowser/CServerList.cpp:254 -msgid "Master server list could not be parsed." +#: Client/core/CSettings.cpp:2351 +msgid "Allow server to flash the window" msgstr "" -#. Abort -#: Client/core/ServerBrowser/CServerList.cpp:264 -msgid "Master server list could not be retrieved." +#: Client/core/CSettings.cpp:2356 +msgid "Allow tray balloon notifications" msgstr "" -#: Client/core/ServerBrowser/CServerList.cpp:274 -msgid "(Backup server list)" +#: Client/core/CSettings.cpp:2361 +msgid "Chat text black/white outline" msgstr "" -#: Client/core/ServerBrowser/CServerList.cpp:326 -msgid "Cannot bind LAN-broadcast socket" +#. Create a messagebox to notify the user +#. SString strText = SString::Printf ( "Press a key to bind to '%s'", pItemBind->GetText ().c_str () ); +#. Create a messagebox to notify the user +#. sSString strText = SString::Printf ( "Press a key to bind to '%s'", pItemBind->GetText ().c_str () ); +#: Client/core/CSettings.cpp:2610 Client/core/CSettings.cpp:2617 +msgid "Press a key to bind, or escape to clear" msgstr "" -#: Client/core/ServerBrowser/CServerList.cpp:345 -msgid "Attempting to discover LAN servers" +#: Client/core/CSettings.cpp:2611 +msgid "Binding a primary key" msgstr "" -#: Client/loader/Install.cpp:265 -msgid "Unknown" +#: Client/core/CSettings.cpp:2618 +msgid "Binding a secondary key" msgstr "" -#: Client/loader/Install.cpp:272 -#, c-format -msgid "" -"The file '%s' is currently locked by %zu processes.\n" -"\n" -"Do you want to terminate the following processes and continue updating?\n" -"\n" -"%s" +#: Client/core/CSettings.cpp:2694 +msgid "GTA GAME CONTROLS" msgstr "" -#: Client/loader/Install.cpp:479 -#, c-format -msgid "" -"Your installation may be corrupt now.\n" -"\n" -"%zu out of %zu files could not be restored from the backup.\n" -"\n" -"You should reinstall Multi Theft Auto from www.multitheftauto.com\n" -"or try running the update with administrator rights." +#: Client/core/CSettings.cpp:2696 +msgid "MULTIPLAYER CONTROLS" msgstr "" -#: Client/loader/Install.cpp:852 Client/loader/Dialogs.cpp:901 -msgid "Installing update..." +#: Client/core/CSettings.cpp:2941 Client/core/CSettings.cpp:4764 +msgid "Your nickname contains invalid characters!" msgstr "" -#: Client/loader/Install.cpp:934 Client/loader/Dialogs.cpp:909 -msgid "Extracting files..." +#: Client/core/CSettings.cpp:3778 +msgid "Red:" msgstr "" -#: Client/loader/Dialogs.cpp:134 -msgid "Quit" +#: Client/core/CSettings.cpp:3778 +msgid "Green:" msgstr "" -#: Client/loader/Dialogs.cpp:151 -msgid "MTA: San Andreas has encountered a problem" +#: Client/core/CSettings.cpp:3778 +msgid "Blue:" msgstr "" -#: Client/loader/Dialogs.cpp:152 -msgid "Crash information" +#: Client/core/CSettings.cpp:3778 +msgid "Transparency:" msgstr "" -#: Client/loader/Dialogs.cpp:153 -msgid "" -"Tick the check box to send this crash info to MTA devs using the 'internet'" +#: Client/core/CSettings.cpp:3781 +msgid "Color" msgstr "" -#: Client/loader/Dialogs.cpp:154 -msgid "Doing so will increase the chance of this crash being fixed." +#: Client/core/CSettings.cpp:3858 +msgid "Preview" msgstr "" -#: Client/loader/Dialogs.cpp:155 -msgid "Do you want to restart MTA: San Andreas ?" +#: Client/core/CSettings.cpp:4166 +msgid "Please disconnect before changing language" msgstr "" -#: Client/loader/Dialogs.cpp:162 -msgid "MTA: San Andreas - Warning" +#: Client/core/CSettings.cpp:4194 +msgid "Please disconnect before changing skin" msgstr "" -#: Client/loader/Dialogs.cpp:163 +#: Client/core/CSettings.cpp:4482 msgid "" -"Your Grand Theft Auto: San Andreas install directory contains these files:" +"Volmetric shadows can cause some systems to slow down.\n" +"\n" +"Are you sure you want to enable them?" msgstr "" -#: Client/loader/Dialogs.cpp:165 -msgid "" -"These files are not required and may interfere with the graphical features " -"in this version of MTA:SA.\n" -"\n" -"It is recommended that you remove or rename these files." +#: Client/core/CSettings.cpp:4486 +msgid "PERFORMANCE WARNING" msgstr "" -#: Client/loader/Dialogs.cpp:167 -msgid "Keep these files, but also show this warning on next start" +#: Client/core/CSettings.cpp:4506 +msgid "" +"Screen upload is required by some servers for anti-cheat purposes.\n" +"\n" +"(The chat box and GUI is excluded from the upload)\n" msgstr "" -#: Client/loader/Dialogs.cpp:168 -msgid "Do not remind me about these files again" +#: Client/core/CSettings.cpp:4508 +msgid "SCREEN UPLOAD INFORMATION" msgstr "" -#: Client/loader/Dialogs.cpp:169 -msgid "Rename these files from *.dll to *.dll.bak" +#: Client/core/CSettings.cpp:4523 +msgid "" +"Some scripts may play sounds, such as radio, from the internet.\n" +"\n" +"Disabling this setting may decrease network\n" +"bandwidth consumption.\n" msgstr "" -#: Client/loader/Dialogs.cpp:170 -msgid "Show me these files" +#: Client/core/CSettings.cpp:4526 +msgid "EXTERNAL SOUNDS" msgstr "" -#: Client/loader/Dialogs.cpp:171 -msgid "Play MTA:SA" +#: Client/core/CSettings.cpp:4555 +msgid "" +"It seems that you have the Rich Presence connection option enabled.\n" +"Do you want to allow servers to share their data?\n" +"\n" +"This includes yours unique ID identifier." msgstr "" -#: Client/loader/Dialogs.cpp:177 -msgid "MTA: San Andreas - Confusing options" +#: Client/core/CSettings.cpp:4560 +msgid "CONSENT TO ALLOW DATA SHARING" msgstr "" -#: Client/loader/Dialogs.cpp:178 -msgid "NVidia Optimus detected!" +#: Client/core/CSettings.cpp:4584 +msgid "" +"Some files in your GTA:SA data directory are customized.\n" +"MTA will only use these modified files if this check box is ticked.\n" +"\n" +"However, CUSTOMIZED GTA:SA FILES ARE BLOCKED BY MANY SERVERS\n" +"\n" +"Are you sure you want to use them?" msgstr "" -#: Client/loader/Dialogs.cpp:179 -msgid "Try each option and see what works:" +#: Client/core/CSettings.cpp:4633 +msgid "" +"Enabling DPI awareness is an experimental feature and\n" +"we only recommend it when you play MTA:SA on a scaled monitor.\n" +"You may experience graphical issues if you enable this option.\n" +"\n" +"Are you sure you want to enable this option?" msgstr "" -#: Client/loader/Dialogs.cpp:180 -msgid "A - Standard NVidia" +#: Client/core/CSettings.cpp:4639 +msgid "EXPERIMENTAL FEATURE" msgstr "" -#: Client/loader/Dialogs.cpp:181 -msgid "B - Alternate NVidia" +#: Client/core/CSettings.cpp:4782 +msgid "Please enter a nickname" msgstr "" -#: Client/loader/Dialogs.cpp:182 -msgid "C - Standard Intel" +#: Client/core/CSettings.cpp:4783 +msgid "" +"Please enter a nickname to be used ingame. \n" +"This will be your name when you connect to and play in a server" msgstr "" -#: Client/loader/Dialogs.cpp:183 -msgid "D - Alternate Intel" +#: Client/core/CSettings.cpp:4801 +msgid "Very experimental feature." msgstr "" -#: Client/loader/Dialogs.cpp:184 -msgid "If you get desperate, this might help:" +#: Client/core/CSettings.cpp:4803 +msgid "Stops stalls with CJ variations (Uses 65MB more RAM)" msgstr "" -#: Client/loader/Dialogs.cpp:185 -msgid "If you have already selected an option that works, this might help:" +#: Client/core/CSettings.cpp:4805 +msgid "Older routers may require a slower scan speed." msgstr "" -#: Client/loader/Dialogs.cpp:186 -msgid "Force windowed mode" +#: Client/core/CSettings.cpp:4807 +msgid "Switch on to use only one connection when downloading." msgstr "" -#: Client/loader/Dialogs.cpp:187 -msgid "Don't show again" +#: Client/core/CSettings.cpp:4809 +msgid "Tag network packets to help ISPs identify MTA traffic." msgstr "" -#: Client/loader/Dialogs.cpp:194 Client/game_sa/CSettingsSA.cpp:831 -msgid "MTA: San Andreas" +#: Client/core/CSettings.cpp:4811 +msgid "Spinning circle animation at the bottom of the screen" msgstr "" -#: Client/loader/Dialogs.cpp:195 -msgid "Warning: Could not detect anti-virus product" +#: Client/core/CSettings.cpp:4813 +msgid "Select default always. (This setting is not saved)" msgstr "" -#: Client/loader/Dialogs.cpp:197 -msgid "" -"MTA could not detect an anti-virus on your PC.\n" -"\n" -"Viruses interfere with MTA and degrade your gameplay experience.\n" -"\n" -"Press 'Help' for more information." +#: Client/core/CSettings.cpp:4815 +msgid "Maximum is usually best" msgstr "" -#: Client/loader/Dialogs.cpp:200 -msgid "I have already installed an anti-virus" +#: Client/core/CSettings.cpp:4817 Client/core/CSettings.cpp:4819 +msgid "Auto updater:" msgstr "" -#: Client/loader/Dialogs.cpp:202 -msgid "" -"I will not install an anti-virus.\n" -"I want my PC to lag and be part of a botnet." +#: Client/core/CSettings.cpp:4817 +msgid "Select default unless you like filling out bug reports." msgstr "" -#: Client/loader/Dialogs.cpp:890 Client/loader/Utils.cpp:534 -msgid "Searching for Grand Theft Auto San Andreas" +#: Client/core/CSettings.cpp:4819 +msgid "Select default to automatically install important updates." msgstr "" -#: Client/loader/Dialogs.cpp:893 Client/loader/Utils.cpp:536 -msgid "Please start Grand Theft Auto San Andreas" +#: Client/core/CSettings.cpp:4821 +msgid "16-bit color:" msgstr "" -#: Client/loader/Dialogs.cpp:914 Client/loader/Utils.cpp:1394 -msgid "Copying files..." +#: Client/core/CSettings.cpp:4821 +msgid "Enable 16 bit color modes - Requires MTA restart" msgstr "" -#: Client/loader/Dialogs.cpp:919 Client/loader/Utils.cpp:1454 -msgid "Copy finished early. Everything OK." +#: Client/core/CSettings.cpp:4823 +msgid "Mouse fix:" msgstr "" -#: Client/loader/Dialogs.cpp:924 Client/loader/Utils.cpp:1460 -msgid "Finishing..." +#: Client/core/CSettings.cpp:4823 +msgid "Mouse movement fix - May need PC restart" msgstr "" -#: Client/loader/Dialogs.cpp:928 Client/loader/Utils.cpp:1462 -msgid "Done!" +#: Client/core/CConnectManager.cpp:79 +msgid "Connecting failed. Invalid nick provided!" msgstr "" -#: Client/loader/Utils.cpp:600 -msgid "Select your Grand Theft Auto: San Andreas Installation Directory" +#: Client/core/CConnectManager.cpp:110 +msgid "Connecting failed. Invalid host provided!" msgstr "" -#: Client/loader/Utils.cpp:968 Client/loader/CInstallManager.cpp:361 +#: Client/core/CConnectManager.cpp:126 #, c-format -msgid "" -"MTA:SA needs Administrator access for the following task:\n" -"\n" -" '%s'\n" -"\n" -"Please confirm in the next window." +msgid "Connecting to %s at port %u failed!" msgstr "" -#: Client/loader/Utils.cpp:1069 +#. Display the status box +#: Client/core/CConnectManager.cpp:147 #, c-format -msgid "Error loading %s module! (%s)" +msgid "Connecting to %s:%u ..." msgstr "" -#: Client/loader/Utils.cpp:1502 +#. Failed loading the mod +#: Client/core/CConnectManager.cpp:403 #, c-format -msgid "" -"New installation of %s detected.\n" -"\n" -"Do you want to copy your settings from %s ?" +msgid "No such mod installed (%s)" msgstr "" -#: Client/loader/Utils.cpp:1541 -#, c-format -msgid "GTA:SA had trouble opening the file '%s'" +#: Client/core/CConnectManager.cpp:411 +msgid "Bad server response (2)" msgstr "" -#: Client/loader/Utils.cpp:1563 -#, c-format -msgid "GTA:SA is missing the file '%s'." +#: Client/core/CConnectManager.cpp:421 +msgid "Bad server response (1)" msgstr "" -#: Client/loader/Utils.cpp:1588 -msgid "GTA:SA had trouble loading a model." +#. Create window +#: Client/core/CConsole.cpp:417 +msgid "CONSOLE" msgstr "" -#: Client/loader/Utils.cpp:1590 -msgid "If you recently modified gta3.img, then try reinstalling GTA:SA." +#: Client/core/DXHook/CDirect3DHook9.cpp:124 +msgid "" +"Could not initialize Direct3D9.\n" +"\n" +"Please ensure the DirectX End-User Runtime and\n" +"latest Windows Service Packs are installed correctly." msgstr "" -#: Client/loader/Utils.cpp:1615 -msgid "GTA:SA had trouble adding an upgrade to a vehicle." +#. Create the window +#: Client/core/ServerBrowser/CServerBrowser.cpp:85 +msgid "SERVER BROWSER" msgstr "" -#: Client/loader/Utils.cpp:1634 -#, c-format -msgid "GTA:SA found errors in the file '%s'" +#: Client/core/ServerBrowser/CServerBrowser.cpp:134 +msgid "Local" msgstr "" -#: Client/loader/Utils.cpp:1716 -msgid "Did your computer restart when playing MTA:SA?" +#: Client/core/ServerBrowser/CServerBrowser.cpp:135 +msgid "Favourites" msgstr "" -#: Client/loader/Utils.cpp:1781 -msgid "Please terminate the following programs before continuing:" +#: Client/core/ServerBrowser/CServerBrowser.cpp:136 +msgid "Recent" msgstr "" -#: Client/loader/MainFunctions.cpp:248 +#: Client/core/ServerBrowser/CServerBrowser.cpp:191 msgid "" -"Trouble restarting MTA:SA\n" -"\n" -"If the problem persists, open Task Manager and\n" -"stop the 'gta_sa.exe' and 'Multi Theft Auto.exe' processes\n" -"\n" +"FOR QUICK CONNECT:\n" "\n" -"Try to launch MTA:SA again?" +"Type the address and port into the address bar.\n" +"Or select a server from the history list and press 'Connect'" msgstr "" -#: Client/loader/MainFunctions.cpp:266 -msgid "" -"Another instance of MTA is already running.\n" -"\n" -"If this problem persists, please restart your computer" -msgstr "" - -#: Client/loader/MainFunctions.cpp:269 -msgid "" -"Another instance of MTA is already running.\n" -"\n" -"Do you want to terminate it?" -msgstr "" - -#: Client/loader/MainFunctions.cpp:294 -msgid "" -"Are you having problems running MTA:SA?.\n" -"\n" -"Do you want to revert to an earlier version?" -msgstr "" - -#: Client/loader/MainFunctions.cpp:324 -msgid "" -"There seems to be a problem launching MTA:SA.\n" -"Resetting GTA settings can sometimes fix this problem.\n" -"\n" -"Do you want to reset GTA settings now?" -msgstr "" - -#: Client/loader/MainFunctions.cpp:339 -msgid "" -"GTA settings have been reset.\n" -"\n" -"Press OK to continue." +#: Client/core/ServerBrowser/CServerBrowser.cpp:203 +msgid "HELP" msgstr "" -#: Client/loader/MainFunctions.cpp:344 -#, c-format -msgid "File could not be deleted: '%s'" +#: Client/core/ServerBrowser/CServerBrowser.cpp:212 +#: Client/core/ServerBrowser/CServerBrowser.cpp:252 +msgid "Refresh" msgstr "" -#. No settings to delete, or can't find them -#: Client/loader/MainFunctions.cpp:352 -msgid "" -"Are you having problems running MTA:SA?.\n" -"\n" -"Do you want to see some online help?" +#: Client/core/ServerBrowser/CServerBrowser.cpp:212 +#: Client/core/ServerBrowser/CServerBrowser.cpp:253 +msgid "Add Favorite" msgstr "" -#. Inform user -#: Client/loader/MainFunctions.cpp:388 -msgid "" -"Are you having problems running MTA:SA?.\n" -"\n" -"Do you want to change the following setting?" +#: Client/core/ServerBrowser/CServerBrowser.cpp:212 +#: Client/core/ServerBrowser/CServerBrowser.cpp:254 +#: Client/core/ServerBrowser/CServerBrowser.cpp:301 +#: Client/core/ServerBrowser/CServerBrowser.cpp:372 +msgid "Connect" msgstr "" -#: Client/loader/MainFunctions.cpp:431 -msgid "" -"Are you having problems running MTA:SA?.\n" -"\n" -"Try disabling the following products for GTA and MTA:" +#: Client/core/ServerBrowser/CServerBrowser.cpp:212 +#: Client/core/ServerBrowser/CServerBrowser.cpp:255 +msgid "Server information" msgstr "" -#: Client/loader/MainFunctions.cpp:465 -msgid "" -"WARNING\n" -"\n" -"MTA:SA has detected unusual activity.\n" -"Please run a virus scan to ensure your system is secure.\n" -"\n" +#: Client/core/ServerBrowser/CServerBrowser.cpp:213 +#: Client/core/ServerBrowser/CServerBrowser.cpp:256 +msgid "Search servers" msgstr "" -#: Client/loader/MainFunctions.cpp:468 -#, c-format -msgid "The detected file was: %s\n" +#: Client/core/ServerBrowser/CServerBrowser.cpp:213 +#: Client/core/ServerBrowser/CServerBrowser.cpp:257 +msgid "Search players" msgstr "" -#: Client/loader/MainFunctions.cpp:602 -msgid "" -"An instance of GTA: San Andreas is already running. It needs to be " -"terminated before MTA:SA can be started. Do you want to do that now?" +#: Client/core/ServerBrowser/CServerBrowser.cpp:213 +#: Client/core/ServerBrowser/CServerBrowser.cpp:258 +msgid "Start search" msgstr "" -#: Client/loader/MainFunctions.cpp:609 -msgid "" -"Unable to terminate GTA: San Andreas. If the problem persists, please " -"restart your computer." +#: Client/core/ServerBrowser/CServerBrowser.cpp:299 +#: Client/core/ServerBrowser/CServerBrowser.cpp:1704 +msgid "Search players..." msgstr "" -#: Client/loader/MainFunctions.cpp:632 -msgid "" -"Registry entries are missing. Please reinstall Multi Theft Auto: San Andreas." +#: Client/core/ServerBrowser/CServerBrowser.cpp:422 +#: Client/core/ServerBrowser/CServerBrowser.cpp:1702 +msgid "Search servers..." msgstr "" -#: Client/loader/MainFunctions.cpp:638 -msgid "" -"The path to your installation of GTA: San Andreas contains unsupported " -"(unicode) characters. Please move your Grand Theft Auto: San Andreas " -"installation to a compatible path that contains only standard ASCII " -"characters and reinstall Multi Theft Auto: San Andreas." +#: Client/core/ServerBrowser/CServerBrowser.cpp:453 +msgid "Name" msgstr "" -#: Client/loader/MainFunctions.cpp:648 -msgid "" -"The path to your installation of 'MTA:SA' or 'GTA: San Andreas'\n" -"contains a ';' (semicolon).\n" -"\n" -" If you experience problems when running MTA:SA,\n" -" move your installation(s) to a path that does not contain a semicolon." +#: Client/core/ServerBrowser/CServerBrowser.cpp:454 +msgid "Players" msgstr "" -#: Client/loader/MainFunctions.cpp:810 -msgid "" -"Load failed. Please ensure that the latest data files have been installed " -"correctly." +#: Client/core/ServerBrowser/CServerBrowser.cpp:455 +msgid "Ping" msgstr "" -#: Client/loader/MainFunctions.cpp:819 -#, c-format -msgid "Load failed. Please ensure that %s is installed correctly." +#: Client/core/ServerBrowser/CServerBrowser.cpp:456 +msgid "Gamemode" msgstr "" -#: Client/loader/MainFunctions.cpp:826 -#, c-format -msgid "Load failed. Could not find gta_sa.exe in %s." +#. Player List Columns +#. Column for player names +#: Client/core/ServerBrowser/CServerBrowser.cpp:478 +#: Client/core/ServerBrowser/CServerInfo.cpp:138 +msgid "Player list" msgstr "" -#: Client/loader/MainFunctions.cpp:836 -#, c-format -msgid "" -"Load failed. %s exists in the GTA directory. Please delete before continuing." +#. Include label +#: Client/core/ServerBrowser/CServerBrowser.cpp:486 +msgid "Include:" msgstr "" -#: Client/loader/MainFunctions.cpp:845 -#, c-format -msgid "Main file has an incorrect name (%s)" +#: Client/core/ServerBrowser/CServerBrowser.cpp:492 +msgid "Empty" msgstr "" -#: Client/loader/MainFunctions.cpp:856 -msgid "" -"Main file is unsigned. Possible virus activity.\n" -"\n" -"See online help if MTA does not work correctly." +#: Client/core/ServerBrowser/CServerBrowser.cpp:498 +msgid "Full" msgstr "" -#: Client/loader/MainFunctions.cpp:882 -#, c-format -msgid "" -"Data file %s is missing. Possible virus activity.\n" -"\n" -"Consider reinstalling Multi Theft Auto for your security.\n" -"See online help if MTA does not work correctly." +#: Client/core/ServerBrowser/CServerBrowser.cpp:504 +msgid "Locked" msgstr "" -#: Client/loader/MainFunctions.cpp:893 -#, c-format -msgid "" -"Data file %s is modified. Possible virus activity.\n" -"\n" -"Consider reinstalling Multi Theft Auto for your security.\n" -"See online help if MTA does not work correctly." +#: Client/core/ServerBrowser/CServerBrowser.cpp:516 +msgid "Offline" msgstr "" -#: Client/loader/MainFunctions.cpp:907 -msgid "" -".asi files are in the 'MTA:SA' or 'GTA: San Andreas' installation " -"directory.\n" -"\n" -"Remove these .asi files if you experience problems with MTA:SA." +#: Client/core/ServerBrowser/CServerBrowser.cpp:529 +msgid "Other Versions" msgstr "" -#: Client/loader/MainFunctions.cpp:1009 -msgid "" -"File version mismatch error. Reinstall MTA:SA if you experience problems.\n" +#: Client/core/ServerBrowser/CServerBrowser.cpp:550 +msgid "Back" msgstr "" -#: Client/loader/MainFunctions.cpp:1018 -msgid "Some files are missing. Reinstall MTA:SA if you experience problems.\n" +#: Client/core/ServerBrowser/CServerBrowser.cpp:741 +msgid "Loading..." msgstr "" -#: Client/loader/MainFunctions.cpp:1030 -msgid "" -"MTA:SA is not compatible with Windows 'Safe Mode'.\n" -"\n" -"Please restart your PC.\n" +#: Client/core/ServerBrowser/CServerBrowser.cpp:1247 +#: Client/core/ServerBrowser/CServerBrowser.cpp:2189 +msgid " ..loading.." msgstr "" -#: Client/loader/MainFunctions.cpp:1123 -msgid "Fix configuration issue" +#: Client/core/ServerBrowser/CServerBrowser.cpp:1285 +#: Client/core/ServerBrowser/CServerBrowser.cpp:1413 +msgid "No address specified!" msgstr "" -#. Try to relaunch as admin if not done so already -#: Client/loader/MainFunctions.cpp:1157 -msgid "Fix elevation required error" +#: Client/core/ServerBrowser/CServerBrowser.cpp:1298 +msgid "Unknown protocol" msgstr "" -#: Client/loader/MainFunctions.cpp:1164 -#, c-format -msgid "" -"Could not start Grand Theft Auto: San Andreas. Please try restarting, or if " -"the problem persists,contact MTA at www.multitheftauto.com. \n" -"\n" -"[%s]" +#: Client/core/ServerBrowser/CServerBrowser.cpp:1298 +msgid "Please use the mtasa:// protocol!" msgstr "" -#: Client/loader/MainFunctions.cpp:1219 -msgid "" -"GTA: San Andreas may not have launched correctly. Do you want to terminate " -"it?" +#: Client/core/ServerBrowser/CServerBrowser.cpp:1387 +msgid "You have to select a server to connect to." msgstr "" -#: Client/loader/CInstallManager.cpp:376 -#, c-format -msgid "" -"MTA:SA could not complete the following task:\n" -"\n" -" '%s'\n" +#: Client/core/ServerBrowser/CServerList.cpp:25 +msgid "Idle" msgstr "" -#: Client/loader/CInstallManager.cpp:426 -msgid "" -"** The crash was caused by a graphics driver error **\n" -"\n" -"** Please update your graphics drivers **" -msgstr "" +#: Client/core/ServerBrowser/CServerList.cpp:150 +msgid "player" +msgid_plural "players" +msgstr[0] "" +msgstr[1] "" -#: Client/loader/CInstallManager.cpp:532 -msgid "Install updated MTA:SA files" +#: Client/core/ServerBrowser/CServerList.cpp:151 +msgid "on" msgstr "" -#: Client/loader/CInstallManager.cpp:552 -msgid "" -"Could not update due to file conflicts. Please close other applications and " -"retry" -msgstr "" +#: Client/core/ServerBrowser/CServerList.cpp:154 +msgid "server" +msgid_plural "servers" +msgstr[0] "" +msgstr[1] "" -#: Client/loader/CInstallManager.cpp:561 +#. We are polling for the master server list (first pass) +#: Client/core/ServerBrowser/CServerList.cpp:238 #, c-format -msgid "Multi Theft Auto has not been installed properly, please reinstall. %s" -msgstr "" - -#: Client/loader/CInstallManager.cpp:613 -msgid "Create GTA:SA junctions" -msgstr "" - -#: Client/loader/CInstallManager.cpp:657 -msgid "MTA:SA cannot launch because copying a file failed:" -msgstr "" - -#: Client/loader/CInstallManager.cpp:663 Client/loader/CInstallManager.cpp:703 -msgid "MTA:SA cannot launch because an MTA:SA file is incorrect or missing:" -msgstr "" - -#: Client/loader/CInstallManager.cpp:672 -msgid "Copy MTA:SA files" +msgid "Requesting master server list (%lu ms elapsed)" msgstr "" -#: Client/loader/CInstallManager.cpp:695 Client/loader/CInstallManager.cpp:773 -msgid "MTA:SA cannot launch because a GTA:SA file is incorrect or missing:" +#. Abort +#: Client/core/ServerBrowser/CServerList.cpp:254 +msgid "Master server list could not be parsed." msgstr "" -#: Client/loader/CInstallManager.cpp:780 -msgid "Patch GTA:SA dependency" +#. Abort +#: Client/core/ServerBrowser/CServerList.cpp:264 +msgid "Master server list could not be retrieved." msgstr "" -#: Client/loader/CInstallManager.cpp:828 -msgid "" -"MTA:SA cannot launch because the GTA:SA executable is incorrect or missing:" +#: Client/core/ServerBrowser/CServerList.cpp:274 +msgid "(Backup server list)" msgstr "" -#: Client/loader/CInstallManager.cpp:832 -msgid "" -"Please check your anti-virus for a false-positive detection, try to add an " -"exception for the GTA:SA executable and restart MTA:SA." +#: Client/core/ServerBrowser/CServerList.cpp:326 +msgid "Cannot bind LAN-broadcast socket" msgstr "" -#: Client/loader/CInstallManager.cpp:838 -msgid "Generate GTA:SA" +#: Client/core/ServerBrowser/CServerList.cpp:345 +msgid "Attempting to discover LAN servers" msgstr "" -#: Client/loader/CInstallManager.cpp:853 -msgid "MTA:SA cannot launch because the GTA:SA executable is not loadable:" +#. Create queue window +#: Client/core/ServerBrowser/CServerInfo.cpp:32 +#: Client/core/ServerBrowser/CServerInfo.cpp:302 +msgid "SERVER IS FULL" msgstr "" -#: Client/loader/CInstallManager.cpp:860 Client/loader/CInstallManager.cpp:883 -msgid "Patch GTA:SA" +#. Determine our label draw position for L10n +#. Start position +#. Server Name +#: Client/core/ServerBrowser/CServerInfo.cpp:44 +#: Client/core/ServerBrowser/CServerInfo.cpp:53 +msgid "Name:" msgstr "" -#: Client/loader/CInstallManager.cpp:876 -msgid "MTA:SA cannot launch because patching GTA:SA has failed:" +#. Server IP +#: Client/core/ServerBrowser/CServerInfo.cpp:44 +#: Client/core/ServerBrowser/CServerInfo.cpp:64 +msgid "Server Address:" msgstr "" -#: Client/loader/CInstallManager.cpp:1113 -msgid "Missing file:" +#. Gamemode +#: Client/core/ServerBrowser/CServerInfo.cpp:44 +#: Client/core/ServerBrowser/CServerInfo.cpp:75 +msgid "Gamemode:" msgstr "" -#: Client/loader/CInstallManager.cpp:1117 -msgid "If MTA fails to load, please re-install GTA:SA" +#. Map +#: Client/core/ServerBrowser/CServerInfo.cpp:44 +#: Client/core/ServerBrowser/CServerInfo.cpp:86 +msgid "Map:" msgstr "" -#: Client/loader/CInstallManager.cpp:1152 -msgid "Update install settings" +#. Players +#: Client/core/ServerBrowser/CServerInfo.cpp:45 +#: Client/core/ServerBrowser/CServerInfo.cpp:97 +msgid "Players:" msgstr "" -#: Client/loader/CInstallManager.cpp:1305 -msgid "Update compatibility settings" +#. Passworded +#: Client/core/ServerBrowser/CServerInfo.cpp:45 +#: Client/core/ServerBrowser/CServerInfo.cpp:108 +msgid "Passworded:" msgstr "" -#. Couldn't create render target for CPostEffects -#: Client/multiplayer_sa/CMultiplayerSA_CrashFixHacks.cpp:1450 -msgid "Problem with graphics driver" +#. Latency +#: Client/core/ServerBrowser/CServerInfo.cpp:45 +#: Client/core/ServerBrowser/CServerInfo.cpp:119 +msgid "Latency:" msgstr "" -#: Client/game_sa/CSettingsSA.cpp:753 -msgid "Can't find valid screen resolution." +#. Close button +#: Client/core/ServerBrowser/CServerInfo.cpp:144 +msgid "Close" msgstr "" -#. Confirm that res should be used -#: Client/game_sa/CSettingsSA.cpp:829 -msgid "Are you sure you want to use this screen resolution?" +#. Join Game button +#: Client/core/ServerBrowser/CServerInfo.cpp:152 +msgid "Join Game" msgstr "" -#: Client/cefweb/CWebsiteRequests.cpp:19 -msgid "Website requests" +#. Please enter password label +#: Client/core/ServerBrowser/CServerInfo.cpp:166 +msgid "Please enter the password to the server:" msgstr "" -#: Client/cefweb/CWebsiteRequests.cpp:27 -msgid "" -"The server requests the following websites in order to load them (later):" +#: Client/core/ServerBrowser/CServerInfo.cpp:177 +msgid "Join the server as soon as a player slot is available." msgstr "" -#: Client/cefweb/CWebsiteRequests.cpp:33 -msgid "NEVER ENTER SENSITIVE DATA TO PROTECT THEM FROM BEING STOLEN" +#: Client/core/ServerBrowser/CServerInfo.cpp:310 +msgid "PLEASE ENTER SERVER PASSWORD" msgstr "" -#: Client/cefweb/CWebsiteRequests.cpp:46 -msgid "Remember decision" +#. The server has timed out +#: Client/core/ServerBrowser/CServerInfo.cpp:402 +msgid "Timed Out" msgstr "" -#: Client/cefweb/CWebsiteRequests.cpp:57 -msgid "Deny" +#. Set every GUI elements text to blank +#: Client/core/ServerBrowser/CServerInfo.cpp:431 +msgid "Querying..." msgstr "" #. Populate the message and show the box diff --git a/Shared/data/MTA San Andreas/MTA/tags.dll b/Shared/data/MTA San Andreas/MTA/tags.dll index f73a96cae2..874ef2c672 100644 Binary files a/Shared/data/MTA San Andreas/MTA/tags.dll and b/Shared/data/MTA San Andreas/MTA/tags.dll differ diff --git a/Shared/data/MTA San Andreas/server/arm64/libcrypto-3-arm64.dll b/Shared/data/MTA San Andreas/server/arm64/libcrypto-3-arm64.dll index a1aacfd788..666c0f287b 100644 Binary files a/Shared/data/MTA San Andreas/server/arm64/libcrypto-3-arm64.dll and b/Shared/data/MTA San Andreas/server/arm64/libcrypto-3-arm64.dll differ diff --git a/Shared/data/MTA San Andreas/server/arm64/libmysql.dll b/Shared/data/MTA San Andreas/server/arm64/libmysql.dll index a570d69c37..3f3e2895e8 100644 Binary files a/Shared/data/MTA San Andreas/server/arm64/libmysql.dll and b/Shared/data/MTA San Andreas/server/arm64/libmysql.dll differ diff --git a/Shared/data/MTA San Andreas/server/arm64/libssl-3-arm64.dll b/Shared/data/MTA San Andreas/server/arm64/libssl-3-arm64.dll index dd2936ac56..51a8eb0eb2 100644 Binary files a/Shared/data/MTA San Andreas/server/arm64/libssl-3-arm64.dll and b/Shared/data/MTA San Andreas/server/arm64/libssl-3-arm64.dll differ diff --git a/Shared/data/MTA San Andreas/server/mods/deathmatch/libcrypto-3.dll b/Shared/data/MTA San Andreas/server/mods/deathmatch/libcrypto-3.dll index a54d2e20d5..f7ce3d098e 100644 Binary files a/Shared/data/MTA San Andreas/server/mods/deathmatch/libcrypto-3.dll and b/Shared/data/MTA San Andreas/server/mods/deathmatch/libcrypto-3.dll differ diff --git a/Shared/data/MTA San Andreas/server/mods/deathmatch/libmysql.dll b/Shared/data/MTA San Andreas/server/mods/deathmatch/libmysql.dll index f543bf5103..8efa94f3a6 100644 Binary files a/Shared/data/MTA San Andreas/server/mods/deathmatch/libmysql.dll and b/Shared/data/MTA San Andreas/server/mods/deathmatch/libmysql.dll differ diff --git a/Shared/data/MTA San Andreas/server/mods/deathmatch/libssl-3.dll b/Shared/data/MTA San Andreas/server/mods/deathmatch/libssl-3.dll index 4d45e0095b..e09cfd88c7 100644 Binary files a/Shared/data/MTA San Andreas/server/mods/deathmatch/libssl-3.dll and b/Shared/data/MTA San Andreas/server/mods/deathmatch/libssl-3.dll differ diff --git a/Shared/data/MTA San Andreas/server/x64/libcrypto-3-x64.dll b/Shared/data/MTA San Andreas/server/x64/libcrypto-3-x64.dll index ef3d63129c..01a84081b0 100644 Binary files a/Shared/data/MTA San Andreas/server/x64/libcrypto-3-x64.dll and b/Shared/data/MTA San Andreas/server/x64/libcrypto-3-x64.dll differ diff --git a/Shared/data/MTA San Andreas/server/x64/libmysql.dll b/Shared/data/MTA San Andreas/server/x64/libmysql.dll index 96e63b50d0..7e1949a485 100644 Binary files a/Shared/data/MTA San Andreas/server/x64/libmysql.dll and b/Shared/data/MTA San Andreas/server/x64/libmysql.dll differ diff --git a/Shared/data/MTA San Andreas/server/x64/libssl-3-x64.dll b/Shared/data/MTA San Andreas/server/x64/libssl-3-x64.dll index 8e7f859cd6..849cd5f0ba 100644 Binary files a/Shared/data/MTA San Andreas/server/x64/libssl-3-x64.dll and b/Shared/data/MTA San Andreas/server/x64/libssl-3-x64.dll differ diff --git a/Shared/data/launchers/CEFLauncher.exe b/Shared/data/launchers/CEFLauncher.exe index 62684b73d0..8ddad15d39 100644 Binary files a/Shared/data/launchers/CEFLauncher.exe and b/Shared/data/launchers/CEFLauncher.exe differ diff --git a/Shared/data/launchers/MTA Server ARM64.exe b/Shared/data/launchers/MTA Server ARM64.exe index 1dba234e53..f64006f3d8 100644 Binary files a/Shared/data/launchers/MTA Server ARM64.exe and b/Shared/data/launchers/MTA Server ARM64.exe differ diff --git a/Shared/data/launchers/MTA Server.exe b/Shared/data/launchers/MTA Server.exe index f89f45b7ef..bc664aec89 100644 Binary files a/Shared/data/launchers/MTA Server.exe and b/Shared/data/launchers/MTA Server.exe differ diff --git a/Shared/data/launchers/MTA Server64.exe b/Shared/data/launchers/MTA Server64.exe index 0914af8aa5..021e55401f 100644 Binary files a/Shared/data/launchers/MTA Server64.exe and b/Shared/data/launchers/MTA Server64.exe differ diff --git a/Shared/data/launchers/Multi Theft Auto.exe b/Shared/data/launchers/Multi Theft Auto.exe index 3093964d55..99fcb3c6bf 100644 Binary files a/Shared/data/launchers/Multi Theft Auto.exe and b/Shared/data/launchers/Multi Theft Auto.exe differ diff --git a/Shared/data/launchers/wow64_helper.exe b/Shared/data/launchers/wow64_helper.exe index 38927395bb..24a78f7abb 100644 Binary files a/Shared/data/launchers/wow64_helper.exe and b/Shared/data/launchers/wow64_helper.exe differ diff --git a/Shared/installer/locale/en_US.pot b/Shared/installer/locale/en_US.pot index 3af1c40ebd..5ad1d78304 100644 --- a/Shared/installer/locale/en_US.pot +++ b/Shared/installer/locale/en_US.pot @@ -3,7 +3,7 @@ msgid "" msgstr "" "Project-Id-Version: MTA San Andreas Installer 1.x\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-06-26 02:25\n" +"POT-Creation-Date: 2024-09-17 02:47\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -244,29 +244,29 @@ msgid "Editor" msgstr "" #. INST_SEC_DEVELOPER -#: Shared/installer/nightly.nsi:983 +#: Shared/installer/nightly.nsi:986 msgid "Development" msgstr "" #. UNINST_SUCCESS -#: Shared/installer/nightly.nsi:1031 +#: Shared/installer/nightly.nsi:1034 msgid "$(^Name) was successfully removed from your computer." msgstr "" #. UNINST_FAIL -#: Shared/installer/nightly.nsi:1038 +#: Shared/installer/nightly.nsi:1041 msgid "Uninstallation has failed!" msgstr "" #. UNINST_REQUEST -#: Shared/installer/nightly.nsi:1046 +#: Shared/installer/nightly.nsi:1049 msgid "" "Are you sure you want to completely remove $(^Name) and all of its " "components?" msgstr "" #. UNINST_REQUEST_NOTE -#: Shared/installer/nightly.nsi:1047 +#: Shared/installer/nightly.nsi:1050 msgid "" "Uninstalling before update?$\r" "$\n" @@ -276,7 +276,7 @@ msgid "" msgstr "" #. UNINST_DATA_REQUEST -#: Shared/installer/nightly.nsi:1060 +#: Shared/installer/nightly.nsi:1063 msgid "" "Would you like to keep your data files (such as resources, screenshots and " "server configuration)? If you click no, any resources, configurations or " @@ -284,27 +284,27 @@ msgid "" msgstr "" #. UAC_RIGHTS1 -#: Shared/installer/nightly.nsi:1243 +#: Shared/installer/nightly.nsi:1246 msgid "This installer requires admin access, try again" msgstr "" #. UAC_RIGHTS_UN -#: Shared/installer/nightly.nsi:1244 +#: Shared/installer/nightly.nsi:1247 msgid "This uninstaller requires admin access, try again" msgstr "" #. UAC_RIGHTS3 -#: Shared/installer/nightly.nsi:1245 +#: Shared/installer/nightly.nsi:1248 msgid "Logon service not running, aborting!" msgstr "" #. UAC_RIGHTS4 -#: Shared/installer/nightly.nsi:1246 +#: Shared/installer/nightly.nsi:1249 msgid "Unable to elevate" msgstr "" #. INST_MTA_CONFLICT -#: Shared/installer/nightly.nsi:1842 +#: Shared/installer/nightly.nsi:1845 msgid "" "A different major version of MTA ($1) already exists at that path.$\n" "$\n" @@ -313,7 +313,7 @@ msgid "" msgstr "" #. INST_GTA_CONFLICT -#: Shared/installer/nightly.nsi:1846 +#: Shared/installer/nightly.nsi:1849 msgid "" "MTA cannot be installed into the same directory as GTA:SA.$\n" "$\n" @@ -322,7 +322,7 @@ msgid "" msgstr "" #. INST_GTA_ERROR1 -#: Shared/installer/nightly.nsi:1849 +#: Shared/installer/nightly.nsi:1852 msgid "" "The selected directory does not exist.$\n" "$\n" @@ -330,7 +330,7 @@ msgid "" msgstr "" #. INST_GTA_ERROR2 -#: Shared/installer/nightly.nsi:1851 +#: Shared/installer/nightly.nsi:1854 msgid "" "Could not find GTA:SA installed at $GTA_DIR $\n" "$\n" @@ -338,19 +338,19 @@ msgid "" msgstr "" #. INST_CHOOSE_LOC_TOP -#: Shared/installer/nightly.nsi:1969 +#: Shared/installer/nightly.nsi:1972 msgid "Choose Install Location" msgstr "" #. INST_CHOOSE_LOC -#: Shared/installer/nightly.nsi:1970 +#: Shared/installer/nightly.nsi:1973 msgid "" "Choose the folder in which to install ${PRODUCT_NAME_NO_VER} " "${PRODUCT_VERSION}" msgstr "" #. INST_CHOOSE_LOC2 -#: Shared/installer/nightly.nsi:1971 +#: Shared/installer/nightly.nsi:1974 msgid "" "${PRODUCT_NAME_NO_VER} ${PRODUCT_VERSION} will be installed in the following folder.$\n" "To install in a different folder, click Browse and select another folder.$\n" @@ -359,63 +359,63 @@ msgid "" msgstr "" #. INST_CHOOSE_LOC3 -#: Shared/installer/nightly.nsi:1973 +#: Shared/installer/nightly.nsi:1976 msgid "Destination Folder" msgstr "" #. INST_CHOOSE_LOC_BROWSE -#: Shared/installer/nightly.nsi:1974 +#: Shared/installer/nightly.nsi:1977 msgid "Browse..." msgstr "" #. INST_CHOOSE_LOC_DEFAULT -#: Shared/installer/nightly.nsi:1975 +#: Shared/installer/nightly.nsi:1978 msgid "Default" msgstr "" #. INST_CHOOSE_LOC_LAST_USED -#: Shared/installer/nightly.nsi:1976 +#: Shared/installer/nightly.nsi:1979 msgid "Last used" msgstr "" #. INST_CHOOSE_LOC_CUSTOM -#: Shared/installer/nightly.nsi:1977 +#: Shared/installer/nightly.nsi:1980 msgid "Custom" msgstr "" #. INST_CHOOSE_LOC4 -#: Shared/installer/nightly.nsi:2155 +#: Shared/installer/nightly.nsi:2158 msgid "" "Select the folder to install ${PRODUCT_NAME_NO_VER} ${PRODUCT_VERSION} in:" msgstr "" #. INST_LOC_OW -#: Shared/installer/nightly.nsi:2173 +#: Shared/installer/nightly.nsi:2176 msgid "" "Warning: A different major version of MTA ($1) already exists at that path." msgstr "" #. INST_LOC_UPGRADE -#: Shared/installer/nightly.nsi:2174 +#: Shared/installer/nightly.nsi:2177 msgid "Installation type: Upgrade" msgstr "" #. NETTEST_TITLE1 -#: Shared/installer/nightly.nsi:2408 +#: Shared/installer/nightly.nsi:2411 msgid "Online update" msgstr "" #. NETTEST_TITLE2 -#: Shared/installer/nightly.nsi:2409 +#: Shared/installer/nightly.nsi:2412 msgid "Checking for update information" msgstr "" #. NETTEST_STATUS1 -#: Shared/installer/nightly.nsi:2410 +#: Shared/installer/nightly.nsi:2413 msgid "Checking for installer update information..." msgstr "" #. NETTEST_STATUS2 -#: Shared/installer/nightly.nsi:2411 +#: Shared/installer/nightly.nsi:2414 msgid "Please ensure your firewall is not blocking" msgstr "" diff --git a/Shared/installer/nightly.nsi b/Shared/installer/nightly.nsi index 7890e37fdc..d270a0d719 100644 --- a/Shared/installer/nightly.nsi +++ b/Shared/installer/nightly.nsi @@ -688,9 +688,12 @@ SectionGroup /e "$(INST_SEC_CLIENT)" SECGCLIENT # Added as per https://bitbucket.org/chromiumembedded/cef/commits/8424f166ccef - File "${FILES_ROOT}\mta\CEF\chrome_100_percent.pak" - File "${FILES_ROOT}\mta\CEF\chrome_200_percent.pak" - File "${FILES_ROOT}\mta\CEF\resources.pak" + # Not currently using \mta\cef\ due to https://github.com/chromiumembedded/cef/issues/3749#issuecomment-2278568964 (it's already crashing and likely won't remain supported) + SetOutPath "$INSTDIR\MTA" + + File "${FILES_ROOT}\mta\chrome_100_percent.pak" + File "${FILES_ROOT}\mta\chrome_200_percent.pak" + File "${FILES_ROOT}\mta\resources.pak" # Clarification for the below 4 deprecated files: https://bitbucket.org/chromiumembedded/cef/commits/8424f166ccef #File "${FILES_ROOT}\mta\CEF\cef.pak" diff --git a/Shared/mods/deathmatch/logic/CDebugHookManager.cpp b/Shared/mods/deathmatch/logic/CDebugHookManager.cpp index 48572d7364..b083746acc 100644 --- a/Shared/mods/deathmatch/logic/CDebugHookManager.cpp +++ b/Shared/mods/deathmatch/logic/CDebugHookManager.cpp @@ -659,7 +659,8 @@ bool CDebugHookManager::CallHook(const char* szName, const std::vectorGetType() == LUA_TSTRING) { - if (returnedValue->GetString() == "skip") + // We don't want to skip the creation of new debug hooks + if (returnedValue->GetString() == "skip" && strcmp(szName, "addDebugHook")) bSkip = true; } } diff --git a/Shared/mods/deathmatch/logic/lua/CLuaTimer.cpp b/Shared/mods/deathmatch/logic/lua/CLuaTimer.cpp index f632a1a237..bd0383222b 100644 --- a/Shared/mods/deathmatch/logic/lua/CLuaTimer.cpp +++ b/Shared/mods/deathmatch/logic/lua/CLuaTimer.cpp @@ -23,6 +23,7 @@ CLuaTimer::CLuaTimer(const CLuaFunctionRef& iLuaFunction, const CLuaArguments& A m_uiRepeats = 1; m_iLuaFunction = iLuaFunction; m_Arguments = Arguments; + m_paused = false; } CLuaTimer::~CLuaTimer() @@ -64,8 +65,30 @@ void CLuaTimer::ExecuteTimer(CLuaMain* pLuaMain) } } +void CLuaTimer::SetPaused(bool paused) +{ + if (paused == IsPaused()) + return; + + CTickCount llTimeRemaining = GetTimeLeft(); + if (paused) + { + m_pausedRemainingTime = llTimeRemaining.ToLongLong() == 0LL ? m_llDelay : llTimeRemaining; + } + else + { + CTickCount llCurrentTime = CTickCount::Now(); + CTickCount llNewStartTime = llCurrentTime - (m_llDelay - llTimeRemaining); + SetStartTime(llNewStartTime); + } + m_paused = paused; +} + CTickCount CLuaTimer::GetTimeLeft() { + if (IsPaused()) + return m_pausedRemainingTime; + CTickCount llCurrentTime = CTickCount::Now(); CTickCount llTimeLeft = m_llStartTime + m_llDelay - llCurrentTime; return llTimeLeft.ToLongLong() < 0LL ? CTickCount(0LL) : llTimeLeft; diff --git a/Shared/mods/deathmatch/logic/lua/CLuaTimer.h b/Shared/mods/deathmatch/logic/lua/CLuaTimer.h index 62bb3c97a5..9534c2c47f 100644 --- a/Shared/mods/deathmatch/logic/lua/CLuaTimer.h +++ b/Shared/mods/deathmatch/logic/lua/CLuaTimer.h @@ -17,7 +17,7 @@ class CLuaTimer; #include "lua/LuaCommon.h" #include "lua/CLuaArguments.h" -#define LUA_TIMER_MIN_INTERVAL 0 +#define LUA_TIMER_MIN_INTERVAL 0 class CLuaTimer { @@ -35,6 +35,8 @@ class CLuaTimer unsigned int GetRepeats() const { return m_uiRepeats; }; void SetRepeats(unsigned int uiRepeats) { m_uiRepeats = uiRepeats; } + bool IsPaused() const noexcept { return m_paused; }; + void SetPaused(bool paused); void ExecuteTimer(class CLuaMain* pLuaMain); @@ -45,10 +47,12 @@ class CLuaTimer void SetLuaDebugInfo(const SLuaDebugInfo& luaDebugInfo) { m_LuaDebugInfo = luaDebugInfo; } private: + bool m_paused; CLuaFunctionRef m_iLuaFunction; CLuaArguments m_Arguments; CTickCount m_llStartTime; CTickCount m_llDelay; + CTickCount m_pausedRemainingTime; unsigned int m_uiRepeats; uint m_uiScriptID; SLuaDebugInfo m_LuaDebugInfo; diff --git a/Shared/sdk/SharedUtil.Defines.h b/Shared/sdk/SharedUtil.Defines.h index 8e257d1433..580335e61b 100644 --- a/Shared/sdk/SharedUtil.Defines.h +++ b/Shared/sdk/SharedUtil.Defines.h @@ -26,10 +26,12 @@ // // Architecture // -#if defined( _M_X64 ) || defined( __x86_64__ ) || defined( _M_AMD64 ) +#if defined( _M_X64 ) || defined( __x86_64__ ) || defined( _M_AMD64 ) || defined( __amd64__ ) #define ANY_x64 #ifdef _WIN64 #define WIN_x64 + #elif defined(__APPLE__) + #define APPLE_x64 #else #define LINUX_x64 #endif @@ -37,6 +39,8 @@ #define ANY_arm64 #ifdef _M_ARM64 #define WIN_arm64 + #elif defined(__APPLE__) + #define APPLE_arm64 #else #define LINUX_arm64 #endif diff --git a/Shared/sdk/SharedUtil.File.hpp b/Shared/sdk/SharedUtil.File.hpp index 351afa63c3..0a1cf56c7c 100644 --- a/Shared/sdk/SharedUtil.File.hpp +++ b/Shared/sdk/SharedUtil.File.hpp @@ -156,11 +156,18 @@ bool SharedUtil::FileLoad(std::nothrow_t, const SString& filePath, SString& outB CloseHandle(handle); return true; +#else +#ifdef __APPLE__ + struct stat info; + + if (stat(filePath, &info) != 0) + return false; #else struct stat64 info; if (stat64(filePath, &info) != 0) return false; +#endif size_t fileSize = static_cast(info.st_size); diff --git a/Shared/sdk/SharedUtil.Misc.hpp b/Shared/sdk/SharedUtil.Misc.hpp index ed789460d1..5697da49f4 100644 --- a/Shared/sdk/SharedUtil.Misc.hpp +++ b/Shared/sdk/SharedUtil.Misc.hpp @@ -36,8 +36,8 @@ #endif #endif -#ifdef __APPLE__ - #include "cpuid.h" +#if defined(__APPLE__) && !defined(__aarch64__) + #include #endif CCriticalSection CRefCountable::ms_CS; @@ -1834,6 +1834,8 @@ namespace SharedUtil return FnGetCurrentProcessorNumber(); return _GetCurrentProcessorNumberXP(); +#elif defined(__APPLE__) && defined(__aarch64__) + return -1; #elif defined(__APPLE__) // Hacked from https://stackoverflow.com/a/40398183/1517394 unsigned long cpu; diff --git a/Shared/sdk/net/bitstream.h b/Shared/sdk/net/bitstream.h index e4dc40adf2..c29f739ff1 100644 --- a/Shared/sdk/net/bitstream.h +++ b/Shared/sdk/net/bitstream.h @@ -550,8 +550,8 @@ enum class eBitStreamVersion : unsigned short // Add breakObject to serverside as well // 2024-05-31 - BreakObject_Serverside, - + BreakObject_Serverside, + // Ped syncronization revision // 2024-06-16 PedSync_Revision, @@ -568,6 +568,10 @@ enum class eBitStreamVersion : unsigned short // 2024-07-05 SetMarkerTargetArrowProperties, + // Add respawnObject and toggleObjectRespawn to serverside + // 2024-09-04 + RespawnObject_Serverside, + // This allows us to automatically increment the BitStreamVersion when things are added to this enum. // Make sure you only add things above this comment. Next, diff --git a/Shared/sdk/net/rpc_enums.h b/Shared/sdk/net/rpc_enums.h index e4ce53df29..2318908f4e 100644 --- a/Shared/sdk/net/rpc_enums.h +++ b/Shared/sdk/net/rpc_enums.h @@ -283,5 +283,12 @@ enum eElementRPCFunctions SET_MARKER_TARGET_ARROW_PROPERTIES, + RESPAWN_OBJECT, + TOGGLE_OBJECT_RESPAWN, + + RESET_WORLD_PROPERTIES, + + SPAWN_VEHICLE_FLYING_COMPONENT, + NUM_RPC_FUNCS // Add above this line }; diff --git a/Shared/sdk/version.h b/Shared/sdk/version.h index 9069c14d9b..12d10c80a5 100644 --- a/Shared/sdk/version.h +++ b/Shared/sdk/version.h @@ -108,7 +108,7 @@ #define _ASE_VERSION QUOTE_DEFINE(MTASA_VERSION_MAJOR) "." QUOTE_DEFINE(MTASA_VERSION_MINOR) #define _NETCODE_VERSION_BRANCH_ID 0x4 // Use 0x1 - 0xF to indicate an incompatible branch is being used (0x0 is reserved, 0x4 is trunk) -#define _CLIENT_NET_MODULE_VERSION 0x0AE // (0x000 - 0xfff) Lvl9 wizards only +#define _CLIENT_NET_MODULE_VERSION 0x0AF // (0x000 - 0xfff) Lvl9 wizards only #define _SERVER_NET_MODULE_VERSION 0x0AB // (0x000 - 0xfff) Lvl9 wizards only #define _NETCODE_VERSION 0x1DA // (0x000 - 0xfff) Increment when net messages change (pre-release) diff --git a/premake5.lua b/premake5.lua index 34dc2e37f4..c3375ad1e0 100644 --- a/premake5.lua +++ b/premake5.lua @@ -26,7 +26,7 @@ workspace "MTASA" configurations {"Debug", "Release", "Nightly"} if os.host() == "macosx" then - platforms { "x64" } + platforms { "x64", "arm64" } elseif os.host() == "windows" then platforms { "x86", "x64", "arm64" } else @@ -103,6 +103,10 @@ workspace "MTASA" defaultplatform "x86" end + filter { "system:macosx", "platforms:arm64" } + includedirs { "/opt/homebrew/include" } + libdirs { "/opt/homebrew/lib" } + filter {"system:windows", "configurations:Nightly", "kind:not StaticLib"} symbolspath "$(SolutionDir)Symbols\\$(Configuration)_$(Platform)\\$(ProjectName).pdb" diff --git a/utils/breakpad/dump_syms b/utils/breakpad/dump_syms index febbca066b..b89e9ad6c9 100755 Binary files a/utils/breakpad/dump_syms and b/utils/breakpad/dump_syms differ diff --git a/utils/breakpad/dump_syms_apple b/utils/breakpad/dump_syms_apple new file mode 100644 index 0000000000..72c74cbbfb Binary files /dev/null and b/utils/breakpad/dump_syms_apple differ diff --git a/utils/buildactions/install_cef.lua b/utils/buildactions/install_cef.lua index f01f92af47..65b686aa56 100644 --- a/utils/buildactions/install_cef.lua +++ b/utils/buildactions/install_cef.lua @@ -9,8 +9,8 @@ local CEF_URL_PREFIX = "https://cef-builds.spotifycdn.com/cef_binary_" local CEF_URL_SUFFIX = "_windows32_minimal.tar.bz2" -- Change here to update CEF version -local CEF_VERSION = "127.3.5+g114ea2a+chromium-127.0.6533.120" -local CEF_HASH = "ad91d535873bdd2b6f36135d42a383f92ab2f2959be33db0a6f0f4178cf49436" +local CEF_VERSION = "129.0.12+gf09539f+chromium-129.0.6668.101" +local CEF_HASH = "ec759dbfafafac2ae26f4960caad1c8464205a7787ec247e0fc21ab4620c8a5c" function make_cef_download_url() return CEF_URL_PREFIX..http.escapeUrlParam(CEF_VERSION)..CEF_URL_SUFFIX diff --git a/vendor/cef3/premake5.lua b/vendor/cef3/premake5.lua index 9b8dc65702..115d004975 100644 --- a/vendor/cef3/premake5.lua +++ b/vendor/cef3/premake5.lua @@ -20,7 +20,7 @@ project "CEF" postbuildcommands { "{COPY} \""..cef_path.."Release/*\" \""..path.."mta\"", "{COPY} \""..cef_path.."Resources/icudtl.dat\" \""..path.."mta\"", - "{COPY} \""..cef_path.."Resources/*.pak\" \""..path.."mta/cef\"", + "{COPY} \""..cef_path.."Resources/*.pak\" \""..path.."mta\"", "{COPY} \""..cef_path.."Resources/locales/*\" \""..path.."mta/cef/locales\"" }