Latest Entries »

Changing vehicle handling

Several functions for changing vehicle handling data have been added for plugins and scripts to use. Handling can be set separately for a model index and a specific vehicle. Handling is managed as a set of rules, each of which replace the default value of some handling parameter for some model index or a specific vehicle. If both apply for some vehicle, then the rules for that specific vehicle are used. Superior grip, flying and driving on water can also be set with these functions. Next comes the list of functions. I will shortly explain what each of these functions does.

int ResetAllVehicleHandlings(void);
unsigned int ExistsHandlingRule(int nModelIndex, int nRuleIndex);
int SetHandlingRule(int nModelIndex, int nRuleIndex, double fValue);
double GetHandlingRule(int nModelIndex, int nRuleIndex);
int ResetHandlingRule(int nModelIndex, int nRuleIndex);
int ResetHandling(int nModelIndex);
unsigned int ExistsInstHandlingRule(int nVehicleId, int nRuleIndex);
int SetInstHandlingRule(int nVehicleId, int nRuleIndex, double fValue);
double GetInstHandlingRule(int nVehicleId, int nRuleIndex);
int ResetInstHandlingRule(int nVehicleId, int nRuleIndex);
int ResetInstHandling(int nVehicleId);

ResetAllVehicleHandlings resets all handling rules in the server. ResetHandling resets all handling rules that were set for a model index using SetHandlingRule. ResetInstHandling resets the rules that had been set for a vehicle using SetInstHandlingRule. ResetHandlingRule and ResetInstHandlingRule can be used to reset specific handling settings for a specific model index or vehicle.

ExistsHandlingRule will tell you if a specific handling setting has changed for this model using SetHandlingRule. ExistsInstHandlingRule does the same for specific vehicle instances.

GetHandlingRule will return the value that was set using SetHandlingRule or if hadn’t been changed, the default value for that model index. GetInstHandlingRule returns the value that was set for that specific vehicle or otherwise it simply calls GetHandlingRule internally. These functions always return the value that is currently effective for that model or vehicle index.

SetHandlingRule and SetInstHandlingRule are the functions that are used to actually apply new handling settings to vehicles. Note that only changed values are sent to clients, therefore it is best to keep changes as low as possible if you want to minimize bandwidth usage. Whenever you want to set a value to its original value, use the Reset* functions instead of using Set* functions with default value, since then those changes are basically deleted, causing the bandwidth usage to decrease.

These are the rule indices that can be used with those functions:

 1 Mass
 2 DimensionsX
 3 DimensionsY
 4 DimensionsZ
 5 CentreOfMassX
 6 CentreOfMassY
 7 CentreOfMassZ
 8 PercentSubmerged
 9 TractionMultiplier
10 TractionLoss
11 TractionBias
12 NumberOfGears
13 MaxSpeed
14 Acceleration
15 DriveType
16 EngineType
17 BrakeDeceleration
18 BrakeBias
19 SteeringLock
20 SuspensionForceLevel
21 SuspensionDampening
22 SeatOffset
23 DamageMultiplier
24 SuspensionUpperLimit
25 SuspensionLowerLimit
26 SuspensionBias
27 SuspensionAntiDive
28 Flags
29 LightsFront
30 LightsRear
31 SuperiorGrip
32 FlyingMode
33 DriveOnWater

Flying/boat/bike specific handling rules cannot be changed yet, but will likely be implemented as well.

–maxorator

List of functions, callbacks released

You can see the list of functions and callbacks implemented so far can be found here:

http://forum.vicecitymultiplayer.com/index.php?topic=4637.0

Small update regarding explosives

<Stormeus>  So are remote detonation grenades going to be synced in 0.4?
<maxorator> yes

That is all.

-stormeus

Typing Detection

–Stormeus

World Sanity

VC:MP has new and improved features to try to prevent the unexplainable from happening. Firstly, world boundaries have been improved. Instead of the usual annoying jumping when you try to run through them which could send you head-first into a river, it’s simply a solid, invisible wall. If for some reason you do get through, you’ll get the usual infinite jumping.

Not only that, but the world boundaries can deflect weapons in ways never seen before. You’ll just have to see the video to understand what I’m talking about.

Secondly, VC:MP can prevent wallglitching now! Trying to shoot through a wall is no longer possible. You will see the animation, but no actual shots are fired. Simple.

-Stormeus

Some New Videos

Here are a couple of new videos showing off 0.4′s new features.

Synced, Unoccupied Vehicles

 

Cinematic Explosions

Hackers beware!

This is built right into the server.

Virtual Worlds and New Command

A hint on virtual worlds:

There are over two billion virtual worlds. If you’re in a different virtual world than someone else, they can’t see you, and you can’t see them. World 1 is the default. World 0 is a global world; objects and vehicles in there can be seen by anyone.

In other news, /reconnect has been added as a client command (no more /q and re-opening).

Current Technical Limits

Message Length
500 characters

Virtual Worlds
2,147,483,647

Players
Theoretically: 253
Capped at 100

Vehicles
500

Objects
3,000 (can be optimized further with third-party streamer plugin)

Pickups
2,000

Well, here we go

Since everyone is so excited for 0.4 but thinks the devs/beta testers are all dead, I’m going to use this as a blog-ish area to explain how things are going and show some features off.

First of all, the reason why the last pics and developments posted about 0.4 were in March or April was because maxorator had started rewriting all of VC:MP from scratch at that point. The reason for this was that the code base was getting “messed up” and made it hard to add more complex features. The rewrite, as you can tell, took several months, and has only recently gotten to the point of compiling and running.

Secondly, while there’s been some huge progress made in 0.4 as a result, I, personally, can’t recommend that anyone starts scrapping their servers in the hopes that 0.4 is going to be here in a couple of weeks or a month. It might take longer than that, it might not. Besides, there are plans to write Pawn and Squirrel modules that are compatible with R2 scripts.

Lastly, maxorator is going back to university today (time of this post) since he has exams on, if I recall correctly, the 6th. Development might slow down, and since he won’t be able to update his server with my updated gamemodes, you might see less coming from other beta testers. Chances are, I’ll release the gamemode to the other beta testers when it’s finished.

To wrap this up, I’ll leave the same couple of pictures I’d left on the VC:MP forum, though there’s more to come. The reason I’m the only one in them is because I was testing on my home server. The beta testers are still alive on max’s server.

Look at how sexy our chatbox is

Object testing (it's a crane base)

Follow

Get every new post delivered to your Inbox.