Merge branch 'develop' of ssh://development.life-of-german.org:451/log-gtav/reallife-gamemode into develop

This commit is contained in:
VegaZ
2018-12-18 22:15:31 +01:00
6 changed files with 183 additions and 187 deletions

View File

@@ -3,13 +3,16 @@ stages:
before_script:
- "dotnet restore"
- "git lfs install"
- "git lfs pull"
variables:
GIT_STRATEGY: clone
build:
stage: build
only:
- develop@log-gtav/reallife-gamemode
- develop@log-gtav/reallife-gamemode
script:
- "../gm_database_password.sh"
#- "git lfs install"
#- "git lfs pull"
- "dotnet build -c ServerBuild"
- "../gm_database_password.sh"
- "dotnet build -c ServerBuild"

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) => {
try {
if (entity === undefined || entity === null || !entity.isAVehicle()) return;
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);
} catch (e) {
console.log("error: " + e);
entity = mp.vehicles.atRemoteId(entity);
if (entity === undefined || entity === null || !entity.isAVehicle()) {
mp.gui.chat.push(typeof entity);
return;
}
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) => {

View File

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

View File

@@ -7,9 +7,6 @@
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
<Platforms>AnyCPU;x64</Platforms>
</PropertyGroup>
<ItemGroup>
<None Remove="meta.xml" />
</ItemGroup>
<ItemGroup>
<Content Include="meta.xml">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
@@ -34,11 +31,7 @@
<HintPath>..\Bootstrapper.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Folder Include="Client\dlcpacks\polamggtr\" />
<Folder Include="Migrations\" />
</ItemGroup>
<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>
</Project>