Removed map improvements, added vespucci car dealer, improved csproj, fixed vehiclesync

This commit is contained in:
hydrant
2018-12-18 22:14:03 +01:00
parent 6de309fe7f
commit 4b81803883
5 changed files with 175 additions and 182 deletions

View File

@@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:4583d08eb98355d8640aac132b305e16504c9886fbd319aa44f10c3b7b099987
size 13824

View File

@@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:600fcdcea0bee73c236286d15cdf6ba784791c65eaacb7131cfd4413e653f650
size 25088

View File

@@ -50,177 +50,177 @@ mp.events.add("VehStream_PlayerExitVehicleAttempt", (entity) => {
}); });
mp.events.add("VehStream_PlayerExitVehicle", (entity) => { mp.events.add("VehStream_PlayerExitVehicle", (entity) => {
try { entity = mp.vehicles.atRemoteId(entity);
if (entity === undefined || entity === null || !entity.isAVehicle()) return; if (entity === undefined || entity === null || !entity.isAVehicle()) {
setTimeout(() => { mp.gui.chat.push(typeof entity);
var Status = []; return;
let y = 0;
for (y = 0; y < 8; y++) {
if (entity.isDoorDamaged(y)) {
Status.push(2);
}
else if (entity.getDoorAngleRatio(y) > 0.15) {
Status.push(1);
}
else {
Status.push(0);
}
}
mp.events.callRemote("VehStream_SetDoorData", entity, Status[0], Status[1], Status[2], Status[3], Status[4], Status[5], Status[6], Status[7]);
Status = [];
if (entity.isWindowIntact(0)) {
if (entity.getBoneIndexByName("window_rf") === -1) {
Status.push(1);
}
else {
Status.push(0);
}
}
else {
Status.push(2);
}
if (entity.isWindowIntact(1)) {
if (entity.getBoneIndexByName("window_lf") === -1) {
Status.push(1);
}
else {
Status.push(0);
}
}
else {
Status.push(2);
}
if (entity.isWindowIntact(2)) {
if (entity.getBoneIndexByName("window_rr") === -1) {
Status.push(1);
}
else {
Status.push(0);
}
}
else {
Status.push(2);
}
if (entity.isWindowIntact(3)) {
if (entity.getBoneIndexByName("window_lr") === -1) {
Status.push(1);
}
else {
Status.push(0);
}
}
else {
Status.push(2);
}
mp.events.callRemote("VehStream_SetWindowData", entity, Status[0], Status[1], Status[2], Status[3]);
Status = [];
if (!entity.isTyreBurst(0, false)) {
Status.push(0);
}
else if (entity.isTyreBurst(0, false)) {
Status.push(1);
}
else {
Status.push(2);
}
if (!entity.isTyreBurst(1, false)) {
Status.push(0);
}
else if (entity.isTyreBurst(1, false)) {
Status.push(1);
}
else {
Status.push(2);
}
if (!entity.isTyreBurst(2, false)) {
Status.push(0);
}
else if (entity.isTyreBurst(2, false)) {
Status.push(1);
}
else {
Status.push(2);
}
if (!entity.isTyreBurst(3, false)) {
Status.push(0);
}
else if (entity.isTyreBurst(3, false)) {
Status.push(1);
}
else {
Status.push(2);
}
if (!entity.isTyreBurst(4, false)) {
Status.push(0);
}
else if (entity.isTyreBurst(4, false)) {
Status.push(1);
}
else {
Status.push(2);
}
if (!entity.isTyreBurst(5, false)) {
Status.push(0);
}
else if (entity.isTyreBurst(5, false)) {
Status.push(1);
}
else {
Status.push(2);
}
if (!entity.isTyreBurst(6, false)) {
Status.push(0);
}
else if (entity.isTyreBurst(6, false)) {
Status.push(1);
}
else {
Status.push(2);
}
if (!entity.isTyreBurst(7, false)) {
Status.push(0);
}
else if (entity.isTyreBurst(7, false)) {
Status.push(1);
}
else {
Status.push(2);
}
if (!entity.isTyreBurst(45, false)) {
Status.push(0);
}
else if (entity.isTyreBurst(45, false)) {
Status.push(1);
}
else {
Status.push(2);
}
if (!entity.isTyreBurst(47, false)) {
Status.push(0);
}
else if (entity.isTyreBurst(47, false)) {
Status.push(1);
}
else {
Status.push(2);
}
mp.events.callRemote("VehStream_SetWheelData", entity, Status[0], Status[1], Status[2], Status[3], Status[4], Status[5], Status[6], Status[7], Status[8], Status[9]);
}, 2500);
} catch (e) {
console.log("error: " + e);
} }
setTimeout(() => {
var Status = [];
let y = 0;
for (y = 0; y < 8; y++) {
if (entity.isDoorDamaged(y)) {
Status.push(2);
}
else if (entity.getDoorAngleRatio(y) > 0.15) {
Status.push(1);
}
else {
Status.push(0);
}
}
mp.events.callRemote("VehStream_SetDoorData", entity, Status[0], Status[1], Status[2], Status[3], Status[4], Status[5], Status[6], Status[7]);
Status = [];
if (entity.isWindowIntact(0)) {
if (entity.getBoneIndexByName("window_rf") === -1) {
Status.push(1);
}
else {
Status.push(0);
}
}
else {
Status.push(2);
}
if (entity.isWindowIntact(1)) {
if (entity.getBoneIndexByName("window_lf") === -1) {
Status.push(1);
}
else {
Status.push(0);
}
}
else {
Status.push(2);
}
if (entity.isWindowIntact(2)) {
if (entity.getBoneIndexByName("window_rr") === -1) {
Status.push(1);
}
else {
Status.push(0);
}
}
else {
Status.push(2);
}
if (entity.isWindowIntact(3)) {
if (entity.getBoneIndexByName("window_lr") === -1) {
Status.push(1);
}
else {
Status.push(0);
}
}
else {
Status.push(2);
}
mp.events.callRemote("VehStream_SetWindowData", entity, Status[0], Status[1], Status[2], Status[3]);
Status = [];
if (!entity.isTyreBurst(0, false)) {
Status.push(0);
}
else if (entity.isTyreBurst(0, false)) {
Status.push(1);
}
else {
Status.push(2);
}
if (!entity.isTyreBurst(1, false)) {
Status.push(0);
}
else if (entity.isTyreBurst(1, false)) {
Status.push(1);
}
else {
Status.push(2);
}
if (!entity.isTyreBurst(2, false)) {
Status.push(0);
}
else if (entity.isTyreBurst(2, false)) {
Status.push(1);
}
else {
Status.push(2);
}
if (!entity.isTyreBurst(3, false)) {
Status.push(0);
}
else if (entity.isTyreBurst(3, false)) {
Status.push(1);
}
else {
Status.push(2);
}
if (!entity.isTyreBurst(4, false)) {
Status.push(0);
}
else if (entity.isTyreBurst(4, false)) {
Status.push(1);
}
else {
Status.push(2);
}
if (!entity.isTyreBurst(5, false)) {
Status.push(0);
}
else if (entity.isTyreBurst(5, false)) {
Status.push(1);
}
else {
Status.push(2);
}
if (!entity.isTyreBurst(6, false)) {
Status.push(0);
}
else if (entity.isTyreBurst(6, false)) {
Status.push(1);
}
else {
Status.push(2);
}
if (!entity.isTyreBurst(7, false)) {
Status.push(0);
}
else if (entity.isTyreBurst(7, false)) {
Status.push(1);
}
else {
Status.push(2);
}
if (!entity.isTyreBurst(45, false)) {
Status.push(0);
}
else if (entity.isTyreBurst(45, false)) {
Status.push(1);
}
else {
Status.push(2);
}
if (!entity.isTyreBurst(47, false)) {
Status.push(0);
}
else if (entity.isTyreBurst(47, false)) {
Status.push(1);
}
else {
Status.push(2);
}
mp.events.callRemote("VehStream_SetWheelData", entity, Status[0], Status[1], Status[2], Status[3], Status[4], Status[5], Status[6], Status[7], Status[8], Status[9]);
}, 2500);
}); });
mp.events.add("VehStream_PlayerEnterVehicleAttempt", (entity, seat) => { mp.events.add("VehStream_PlayerEnterVehicleAttempt", (entity, seat) => {

View File

@@ -397,7 +397,7 @@ namespace reallife_gamemode.Server.Util
data.Rotation = veh.Rotation; data.Rotation = veh.Rotation;
UpdateVehicleSyncData(veh, data); UpdateVehicleSyncData(veh, data);
NAPI.ClientEvent.TriggerClientEvent(player, "VehStream_PlayerExitVehicle", veh); NAPI.ClientEvent.TriggerClientEvent(player, "VehStream_PlayerExitVehicle", veh.Handle.Value);
} }
[ServerEvent(Event.PlayerEnterVehicle)] [ServerEvent(Event.PlayerEnterVehicle)]

View File

@@ -7,9 +7,6 @@
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType> <GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
<Platforms>AnyCPU;x64</Platforms> <Platforms>AnyCPU;x64</Platforms>
</PropertyGroup> </PropertyGroup>
<ItemGroup>
<None Remove="meta.xml" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<Content Include="meta.xml"> <Content Include="meta.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
@@ -34,11 +31,7 @@
<HintPath>..\Bootstrapper.dll</HintPath> <HintPath>..\Bootstrapper.dll</HintPath>
</Reference> </Reference>
</ItemGroup> </ItemGroup>
<ItemGroup>
<Folder Include="Client\dlcpacks\polamggtr\" />
<Folder Include="Migrations\" />
</ItemGroup>
<Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="'$(ConfigurationName)' == 'Debug'"> <Target Name="PostBuild" AfterTargets="PostBuildEvent" Condition="'$(ConfigurationName)' == 'Debug'">
<Exec Command="del &quot;..\..\bridge\resources\reallife-gamemode\*.*&quot; /Q /S&#xD;&#xA;xcopy &quot;$(OutDir)*&quot; &quot;..\..\bridge\resources\reallife-gamemode&quot; /Y /Q&#xD;&#xA;del &quot;..\..\client_packages\*.*&quot; /Q /S&#xD;&#xA;xcopy &quot;..\..\reallife-gamemode\reallife-gamemode\Client\*&quot; &quot;..\..\client_packages\&quot; /S /Q /Y&#xD;&#xA;" /> <Exec Command="del &quot;..\..\bridge\resources\reallife-gamemode\*.*&quot; /Q /S&#xD;&#xA;xcopy &quot;$(OutDir)*&quot; &quot;..\..\bridge\resources\reallife-gamemode&quot; /Y /Q&#xD;&#xA;del &quot;..\..\client_packages\*.*&quot; /Q /S&#xD;&#xA;rd &quot;..\..\client_packages&quot; /Q /S&#xD;&#xA;xcopy &quot;..\..\reallife-gamemode\reallife-gamemode\Client\*&quot; &quot;..\..\client_packages\&quot; /S /Q /Y&#xD;&#xA;" />
</Target> </Target>
</Project> </Project>