8 Commits

Author SHA1 Message Date
Vulpovile
de53dcf6b0 Merge pull request #86 from Vulpovile/cleanup/remove_aps_from_repo
Remove  .aps file from repo
2022-10-04 23:08:08 -07:00
Vulpovile
7adf511bf7 Remove APS files 2022-10-04 23:00:55 -07:00
NT_x86
72cdf2af35 Merge pull request #84 from Vulpovile/NT_x86
Minor optimization in createBody
2022-10-05 08:59:37 +03:00
NT_x86
d9a0e1e120 Increment patch number 2022-10-05 08:49:56 +03:00
NT_x86
90a1a1b325 Merge branch 'master' of https://github.com/Vulpovile/Blocks3D.git into NT_x86 2022-10-05 07:42:24 +03:00
NT_x86
984bea6136 Run GetSize and GetPosition only once in CreateBody function 2022-10-05 07:34:49 +03:00
Vulpovile
6d65cd2a56 Merge pull request #82 from Vulpovile/feature/workflows
Add workflow to sync to develop
2022-10-04 13:42:18 -07:00
Vulpovile
223364907f Add workflow to sync to develop 2022-10-04 13:13:15 -07:00
5 changed files with 43 additions and 13 deletions

25
.github/workflows/sync-develop.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
name: Sync Back to Develop
on:
push:
branches:
- master
jobs:
sync-branches:
runs-on: ubuntu-latest
name: Syncing branches
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: 12
- name: Opening pull request
id: pull
uses: tretuna/sync-branches@1.2.0
with:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
FROM_BRANCH: 'master'
TO_BRANCH: 'develop'

3
.gitignore vendored
View File

@@ -40,6 +40,9 @@
*.ilk
*.dep
# ResEditor files
*.aps
/Debug
/Release
stdout.txt

Binary file not shown.

View File

@@ -10,7 +10,7 @@
#define APP_GENER 0
#define APP_MAJOR 0
#define APP_MINOR 106
#define APP_PATCH 2
#define APP_PATCH 3
#define APP_VER_STRING APP_GENER.APP_MAJOR.APP_MINOR.APP_PATCH
#define VER_PREFIX( N ) v##N

View File

@@ -83,7 +83,9 @@ void XplicitNgine::createBody(PartInstance* partInstance)
{
// calculate collisions
//dSpaceCollide (physSpace,0,&collisionCallback);
Vector3 partSize = partInstance->getSize();
Vector3 partPosition = partInstance->getPosition();
if(partInstance->physBody == NULL)
{
// init body
@@ -93,9 +95,9 @@ void XplicitNgine::createBody(PartInstance* partInstance)
if(partInstance->shape == Enum::Shape::Block)
{
partInstance->physGeom[0] = dCreateBox(physSpace,
partInstance->getSize()[0],
partInstance->getSize()[1],
partInstance->getSize()[2]
partSize.x,
partSize.y,
partSize.z
);
dVector3 result;
@@ -108,11 +110,11 @@ void XplicitNgine::createBody(PartInstance* partInstance)
}
else
{
partInstance->physGeom[0] = dCreateSphere(physSpace, partInstance->getSize()[0]/2);
partInstance->physGeom[0] = dCreateSphere(physSpace, partSize[0]/2);
}
dMass mass;
mass.setBox(partInstance->getSize().x, partInstance->getSize().y, partInstance->getSize().z, 0.7F);
mass.setBox(partSize.x, partSize.y, partSize.z, 0.7F);
dBodySetMass(partInstance->physBody, &mass);
// Debug output
@@ -121,15 +123,15 @@ void XplicitNgine::createBody(PartInstance* partInstance)
// Create rigid body
//printf("[XplicitNgine] Created Geom for PartInstance\n");
dBodySetPosition(partInstance->physBody,
partInstance->getPosition()[0],
partInstance->getPosition()[1],
partInstance->getPosition()[2]
partPosition.x,
partPosition.y,
partPosition.z
);
dGeomSetPosition(partInstance->physGeom[0],
partInstance->getPosition()[0],
partInstance->getPosition()[1],
partInstance->getPosition()[2]);
partPosition.x,
partPosition.y,
partPosition.z);
Matrix3 g3dRot = partInstance->getCFrame().rotation;
float rotation [12] = { g3dRot[0][0], g3dRot[0][1], g3dRot[0][2], 0,