Compare commits
3 Commits
34c77f7a1e
...
3b45572d38
| Author | SHA1 | Date | |
|---|---|---|---|
| 3b45572d38 | |||
| 66a7b9e7e6 | |||
| 59f76d6aa7 |
@@ -19,14 +19,6 @@ jobs:
|
|||||||
git config --global http.https://git.kimchi.sslVerify false
|
git config --global http.https://git.kimchi.sslVerify false
|
||||||
git clone --depth 1 https://${{ secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_PASSWORD }}@git.kimchi/tas/major_tom.git .
|
git clone --depth 1 https://${{ secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_PASSWORD }}@git.kimchi/tas/major_tom.git .
|
||||||
|
|
||||||
- name: Debug registry auth
|
|
||||||
run: |
|
|
||||||
curl -s -D- http://git.kimchi/v2/ | head -15
|
|
||||||
TOKEN=$(curl -s "http://git.kimchi/v2/token?service=container_registry&scope=repository:tas/major_tom:push,pull" -u "${{
|
|
||||||
secrets.REGISTRY_USER }}:${{ secrets.REGISTRY_PASSWORD }}" | jq -r .token)
|
|
||||||
echo "Token received: ${TOKEN:0:20}..."
|
|
||||||
curl -s -D- -H "Authorization: Bearer $TOKEN" http://git.kimchi/v2/tas/major_tom/tags/list | head -15
|
|
||||||
|
|
||||||
- name: Build and push container image
|
- name: Build and push container image
|
||||||
run: |
|
run: |
|
||||||
set -ex
|
set -ex
|
||||||
@@ -49,9 +41,10 @@ jobs:
|
|||||||
- name: Restart deployment on k3s
|
- name: Restart deployment on k3s
|
||||||
run: |
|
run: |
|
||||||
mkdir -p ~/.kube
|
mkdir -p ~/.kube
|
||||||
echo "${{ secrets.KUBECONFIG }}" > ~/.kube/config
|
echo "${{ secrets.KUBECONFIG }}" | base64 -d > ~/.kube/config
|
||||||
chmod 600 ~/.kube/config
|
chmod 600 ~/.kube/config
|
||||||
|
kubectl delete pod -l app=${{ env.DEPLOYMENT }} -n ${{ env.NAMESPACE }}
|
||||||
|
|
||||||
POD_NAME=$(kubectl get pods -l app=jnr-web -n jnr-web -o jsonpath='{.items[0].metadata.name}')
|
POD_NAME=$(kubectl get pods -l app=jnr-web -n jnr-web -o jsonpath='{.items[0].metadata.name}')
|
||||||
echo "Deleting running pod" "$POD_NAME"
|
echo "Deleting running pod" "$POD_NAME"
|
||||||
kubectl delete pod $POD_NAME -n jnr-web
|
|
||||||
@@ -306,8 +306,7 @@ static void handle_collisions(EntityManager *em) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* ── Enemy contact damage to player ──── */
|
/* ── Enemy contact damage to player ──── */
|
||||||
if (player && !(player->flags & ENTITY_INVINCIBLE) &&
|
if (player && entity_is_enemy(a) && !(a->flags & ENTITY_DEAD)) {
|
||||||
entity_is_enemy(a) && !(a->flags & ENTITY_DEAD)) {
|
|
||||||
if (physics_overlap(&a->body, &player->body)) {
|
if (physics_overlap(&a->body, &player->body)) {
|
||||||
/* Check if player is stomping (falling onto enemy from above) */
|
/* Check if player is stomping (falling onto enemy from above) */
|
||||||
bool stomping = (player->body.vel.y > 0) &&
|
bool stomping = (player->body.vel.y > 0) &&
|
||||||
@@ -319,7 +318,7 @@ static void handle_collisions(EntityManager *em) {
|
|||||||
damage_entity(a, 2);
|
damage_entity(a, 2);
|
||||||
if (a->flags & ENTITY_DEAD) stats_record_kill();
|
if (a->flags & ENTITY_DEAD) stats_record_kill();
|
||||||
player->body.vel.y = -PLAYER_JUMP_FORCE * 0.7f;
|
player->body.vel.y = -PLAYER_JUMP_FORCE * 0.7f;
|
||||||
} else {
|
} else if (!(player->flags & ENTITY_INVINCIBLE)) {
|
||||||
/* Charger deals extra damage and knockback while charging */
|
/* Charger deals extra damage and knockback while charging */
|
||||||
int dmg = a->damage;
|
int dmg = a->damage;
|
||||||
if (a->type == ENT_ENEMY_CHARGER) {
|
if (a->type == ENT_ENEMY_CHARGER) {
|
||||||
|
|||||||
@@ -308,8 +308,8 @@ void player_update(Entity *self, float dt, const Tilemap *map) {
|
|||||||
pd->dash_timer = PLAYER_DASH_DURATION;
|
pd->dash_timer = PLAYER_DASH_DURATION;
|
||||||
pd->dash_dir = vec2(0.0f, 1.0f);
|
pd->dash_dir = vec2(0.0f, 1.0f);
|
||||||
|
|
||||||
/* Brief invincibility during dash */
|
/* Invincibility during dash + short grace period after */
|
||||||
pd->inv_timer = PLAYER_DASH_DURATION;
|
pd->inv_timer = PLAYER_DASH_DURATION + PLAYER_DASH_INV_GRACE;
|
||||||
self->flags |= ENTITY_INVINCIBLE;
|
self->flags |= ENTITY_INVINCIBLE;
|
||||||
|
|
||||||
/* Jetpack burst downward */
|
/* Jetpack burst downward */
|
||||||
|
|||||||
@@ -39,6 +39,7 @@
|
|||||||
|
|
||||||
/* Invincibility after taking damage */
|
/* Invincibility after taking damage */
|
||||||
#define PLAYER_INV_TIME 1.5f /* seconds of invincibility */
|
#define PLAYER_INV_TIME 1.5f /* seconds of invincibility */
|
||||||
|
#define PLAYER_DASH_INV_GRACE 0.15f /* extra invincibility after dash */
|
||||||
|
|
||||||
/* Aim direction (for shooting) */
|
/* Aim direction (for shooting) */
|
||||||
typedef enum AimDir {
|
typedef enum AimDir {
|
||||||
|
|||||||
Reference in New Issue
Block a user